(codePoint: number)
| 11 | * and use this faster version instead. |
| 12 | */ |
| 13 | export function stringFromCodePoint(codePoint: number): string { |
| 14 | if (codePoint > 0xFFFF) { |
| 15 | codePoint -= 0x10000; |
| 16 | return String.fromCharCode((codePoint >> 10) + 0xD800) + String.fromCharCode((codePoint % 0x400) + 0xDC00); |
| 17 | } |
| 18 | return String.fromCharCode(codePoint); |
| 19 | } |
| 20 | |
| 21 | /** |
| 22 | * Convert UTF32 char codes into JS string. |
no outgoing calls