Skip to content

strToAscii

Converts the given string to ascii code and returns it as an array.

Parameters

  • str::string

Returns

number[]

Examples

javascript
strToAscii('12345'); // Returns [49, 50, 51, 52, 53]
dart
strToAscii('12345'); // Returns [49, 50, 51, 52, 53]
python
strToAscii('12345')  # Returns [49, 50, 51, 52, 53]

Released under the MIT License