参考 unchar()

unchar()

Converts a single-character String to a Number.

unchar() converts single-character strings to their corresponding integer (whole number).

The parameter, n, is the character to convert. For example, unchar('A'), returns the number 65. If an array is passed, as in unchar(['A', 'B', 'C']), an array of integers is returned.

示例

语法

unchar(n)
unchar(ns)

参数

n
String:

value to convert.

ns
String[]:

values to convert.

Returns

Number: converted number.
Notice any errors or typos? Please let us know. Please feel free to edit src/utilities/conversion.js and open a pull request!

相关参考