AK+LibJS: Implement String.from{CharCode,CodePoint} using UTF-16 strings

Most of String.prototype and RegExp.prototype is implemented with UTF-16
so this is to prevent extra copying of the string data.
This commit is contained in:
Timothy Flynn 2021-08-02 17:02:17 -04:00 committed by Andreas Kling
commit 70080feab2
Notes: sideshowbarker 2024-07-18 07:30:31 +09:00
3 changed files with 31 additions and 18 deletions

View file

@ -18,6 +18,7 @@ namespace AK {
Vector<u16> utf8_to_utf16(StringView const&);
Vector<u16> utf8_to_utf16(Utf8View const&);
Vector<u16> utf32_to_utf16(Utf32View const&);
void code_point_to_utf16(Vector<u16>&, u32);
class Utf16View;