Function: stringToUint16()
ts
function stringToUint16(str): Uint16Array;Defined in: stringToUint16.ts:12
Converts a string to a Uint16Array.
Parameters
str
string
The string to convert
Returns
Uint16Array
A Uint16Array representation of the string
Example
ts
const result = stringToUint16('hello world')
deepEqual(result, new Uint16Array([104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100]))