Ascii

Ascii :: # (opaque)
from_str : Str -> Try(Ascii, [InvalidAscii])

Convert a UTF-8 Str to an ASCII string.

to_str : Ascii -> Str

Convert an ASCII string to a UTF-8 Str.

is_eq : Ascii, Ascii -> Bool

Check whether two ASCII strings are equal.

compare : Ascii, Ascii -> [LT, EQ, GT]

Compare the ASCIIbetical order of two ASCII strings, i.e. by comparing their code points.

is_empty : Ascii -> Bool

Check if an ASCII string is empty.

to_uppercase : Ascii -> Ascii

Convert all the lowercase letters in an ASCII string to uppercase, leaving all other characters unchanged.

to_lowercase : Ascii -> Ascii

Convert all the uppercase letters in an ASCII string to lowercase, leaving all other characters unchanged.

concat : Ascii, Ascii -> Ascii

Concatenate two ASCII strings.

join : List(Ascii) -> Ascii

Join a list of ASCII strings.

join_with : List(Ascii), Ascii -> Ascii

Join a list of ASCII strings with a separator.

repeat : Ascii, U64 -> Ascii

Repeat an ASCII string a specified number of times.

starts_with : Ascii, Ascii -> Bool

Check if an ASCII string starts with another ASCII string.

ends_with : Ascii, Ascii -> Bool

Check if an ASCII string ends with another ASCII string.

len : Ascii -> U64

Count the number of characters in an ASCII string.

rev : Ascii -> Ascii

Reverse the characters in an ASCII string.