diff --git a/src/common/TypedArrayUtils.ts b/src/common/TypedArrayUtils.ts index 8b540548..5d3bcb8a 100644 --- a/src/common/TypedArrayUtils.ts +++ b/src/common/TypedArrayUtils.ts @@ -57,9 +57,5 @@ export function concat(a: T, b: T): T { * the conversion will fail. */ export function utf16ToString(data: T): string { - let s = ''; - for (let i = 0; i < data.length; ++i) { - s += String.fromCharCode(data[i]); - } - return s; + return String.fromCharCode.apply(null, data); }