JavaScript: String.prototype.codePointAt
New in JS2015.
str.codePointAt(pos)
-
Return a integer that's the
Codepoint
of character at position
pos of str.
console.log("abc".codePointAt(0) === 97);
console.log("π".codePointAt(0) === 128514); /* [ π name: FACE WITH TEARS OF JOY codepoint 128514 codepoint hexadecimal 1f602 ] */
See also: Unicode Search π