mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
use faster string conversion
This commit is contained in:
@@ -57,9 +57,5 @@ export function concat<T extends TypedArray>(a: T, b: T): T {
|
||||
* the conversion will fail.
|
||||
*/
|
||||
export function utf16ToString<T extends TypedArray>(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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user