Name
StrToArray -- convert a string to an array of code points (V2.0)
Synopsis
t = StrToArray(s$[, encoding])
Function
This function extracts the code point values from s$ and returns them in a table. The table will have as many elements as the string has characters plus a terminating zero.

To convert the array back to a string, you can use the function ArrayToStr(). See ArrayToStr for details.

The optional encoding parameter can be used to set the character encoding to use. This defaults to the default string encoding set using SetDefaultEncoding(). See Character encodings for details.

Inputs
s$
string to convert
encoding
optional: character encoding to use (defaults to default string encoding) (V7.0)
Results
t
a table containing the code point values of the string's characters
Example
t = StrToArray("Hello World")
DebugPrint(Chr(t[6]))
Prints "W".

Show TOC