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!