Cast bytes to a String
without copying. This is the fastest way to get a String
from a Uint16Array
The input must be a UTF-16 encoded string. This API does no validation whatsoever.
The input buffer must not be garbage collected. That means you will need to hold on to it for the duration of the string's lifetime.
Generated using TypeDoc
Cast bytes to a
String
without copying. This is the fastest way to get aString
from aUint8Array
orArrayBuffer
.Only use this for ASCII strings. If there are non-ascii characters, your application may crash and/or very confusing bugs will happen such as
"foo" !== "foo"
.The input buffer must not be garbage collected. That means you will need to hold on to it for the duration of the string's lifetime.