numlib::toAscii -- ASCII
encoding of a string
Introductionnumlib::toAscii(s) returns the list of
ASCII codes of the characters in the string s.
Call(s)numlib::toAscii(s)
Parameterss |
- | a string |
Returnsnumlib::toAscii(s) returns a list of
nonnegative integers.
Related
Functions
Detailsnumlib::toAscii returns an error if its argument is
not a string.
Example
1The ASCII coding of a well-known name:
>> numlib::toAscii("MuPAD - Multi Processing Algebra Data Tool")
[77, 117, 80, 65, 68, 32, 45, 32, 77, 117, 108, 116, 105, 32,
80, 114, 111, 99, 101, 115, 115, 105, 110, 103, 32, 65,
108, 103, 101, 98, 114, 97, 32, 68, 97, 116, 97, 32, 84,
111, 111, 108]
and the ASCII coding of an empty string:
>> numlib::toAscii("")
[]