Navigation
Synopsis Return characters of a string.
Function list[int] chars(str s)
Usage import String;
Description Return a list of the characters of s as integer character codes. Also see stringChars that converts character codes back to string.
Examples
rascal>import String;
ok
rascal>chars("abc");
list[int]: [97,98,99]
rascal>stringChars(chars("abc")) == "abc";
bool: true
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.