Converts the given input into an array of numbers representing the
characters as their decimal value. When a character that is not within the
ASCII spec is encountered, a SUB (0x1Ahex / 26dec) is inserted. We
recommend using Ascii.validate to validate the input first.
Parameters
input: string
The string to convert.
Returns number[]
An array that contains the character codes.
Static validate
validate(input: string): boolean
Validates the given input to make sure it only contains ASCII characters.
Converts the given
input
into an array of numbers representing the characters as their decimal value. When a character that is not within the ASCII spec is encountered, a SUB (0x1A
hex /26
dec) is inserted. We recommend using Ascii.validate to validate the input first.