Decodes a UTF-16BE byte array to a string
Assumes the byte array starts with UTF-16BE BOM (0xFE 0xFF) which is skipped. Each character is represented by 2 bytes (high byte, low byte).
The byte array to decode (should start with BOM)
The decoded string
// Byte array with BOM: 0xFE, 0xFF, 0x00, 0x50, 0x00, 0x52 -> "PR"decodeFromUTF16BE(new Uint8Array([0xFE, 0xFF, 0x00, 0x50, 0x00, 0x52]))// Returns "PR" Copy
// Byte array with BOM: 0xFE, 0xFF, 0x00, 0x50, 0x00, 0x52 -> "PR"decodeFromUTF16BE(new Uint8Array([0xFE, 0xFF, 0x00, 0x50, 0x00, 0x52]))// Returns "PR"
Decodes a UTF-16BE byte array to a string
Assumes the byte array starts with UTF-16BE BOM (0xFE 0xFF) which is skipped. Each character is represented by 2 bytes (high byte, low byte).