Miscellaneous

ASCIIToString
ASCIIToString (vec)

Convert a vector of ASCII values to a string. See also StringToASCII.

Example:

genius> ASCIIToString([97,98,99])
= "abc"

See Wikipedia for more information.

AlphabetToString
AlphabetToString (vec,alphabet)

Convert a vector of 0-based alphabet values (positions in the alphabet string) to a string. A null vector results in an empty string. See also StringToAlphabet.

Examples:

genius> AlphabetToString([1,2,3,0,0],"abcd")
= "bcdaa"
genius> AlphabetToString(null,"abcd")
= ""

StringToASCII
StringToASCII (str)

Convert a string to a (row) vector of ASCII values. See also ASCIIToString.

Example:

genius> StringToASCII("abc")
= [97, 98, 99]

See Wikipedia for more information.

StringToAlphabet
StringToAlphabet (str,alphabet)

Convert a string to a (row) vector of 0-based alphabet values (positions in the alphabet string), -1's for unknown letters. An empty string results in a null. See also AlphabetToString.

Examples:

genius> StringToAlphabet("cca","abcd")
= [2, 2, 0]
genius> StringToAlphabet("ccag","abcd")
= [2, 2, 0, -1]