CharList
Functions
toUpper

Converts characters in a character list from lower case to upper case

Type Signature
<;n>(||)(list<uint8; n>) -> list<uint8; n>
Parameters
str : list<uint8; n>

The string to convert to upper case

Returns

A list of characters

toLower

Converts characters in a character list from upper case to lower case

Type Signature
<;n>(||)(list<uint8; n>) -> list<uint8; n>
Parameters
str : list<uint8; n>

The string to convert to lower case

Returns

A list of characters

i32ToCharList

Converts an int32 to a char list, truncating the string if the char list capacity is not sufficient. The output string will be at most length n.

Type Signature
<;n>(||)(int32) -> charlist<;n>
Parameters
m : int32

The number to convert

Returns

A list of characters

length

Returns the length of a character list, equal to the list length minus one (takes into account the null byte at the end of the character list)

Type Signature
<;n>(||)(list<uint8; n>) -> uint32
Parameters
s : list<uint8; n>

The character list to find the length of

Returns

The length of the character list

concat

Concatenates two character lists together. This should be used instead of List:append due to the null bytes at the end of character lists.

Type Signature
<;aCap,bCap,retCap>(||)(list<uint8;aCap>, list<uint8;bCap>) -> list<uint8;retCap>
Parameters
sA : list<uint8;aCap>

The first character list.

sB : list<uint8;bCap>

The second character list.

Returns

The two lists appended together.

safeConcat

Concatenates two character lists together. Since the return capacity is determined by the input capacities, less type annotations than normal concat are necessary.

Type Signature
<;aCap,bCap>(||)(charlist<;aCap>, charlist<;bCap>) -> charlist<;aCap+bCap>
Parameters
sA : charlist<;aCap>

The first character list.

sB : charlist<;bCap>

The second character list.

Returns

The two lists appended together.