[][src]Function boa::builtins::string::char_code_at

pub fn char_code_at(
    this: &mut Value,
    args: &[Value],
    ctx: &mut Interpreter
) -> ResultValue

String.prototype.charCodeAt( index )

The charCodeAt() method returns an integer between 0 and 65535 representing the UTF-16 code unit at the given index.

Unicode code points range from 0 to 1114111 (0x10FFFF). The first 128 Unicode code points are a direct match of the ASCII character encoding.

charCodeAt() returns NaN if the given index is less than 0, or if it is equal to or greater than the length of the string.

More information: