ladybird/Tests/ClangPlugins
Timothy Flynn 2803d66d87 AK: Support UTF-16 string formatting
The underlying storage used during string formatting is StringBuilder.
To support UTF-16 strings, this patch allows callers to specify a mode
during StringBuilder construction. The default mode is UTF-8, for which
StringBuilder remains unchanged.

In UTF-16 mode, we treat the StringBuilder's internal ByteBuffer as a
series of u16 code units. Appending a single character will append 2
bytes for that character (cast to a char16_t). Appending a StringView
will transcode the string to UTF-16.

Utf16String also gains the same memory optimization that we added for
String, where we hand-off the underlying buffer to Utf16String to avoid
having to re-allocate.

In the future, we may want to further optimize for ASCII strings. For
example, we could defer committing to the u16-esque storage until we
see a non-ASCII code point.
2025-07-18 12:45:38 -04:00
..
LambdaTests Tests: Invoke clang frontend instead of cc1 in ClangPlugin tests 2025-05-12 16:00:55 -04:00
LibJSGCTests Tests: Invoke clang frontend instead of cc1 in ClangPlugin tests 2025-05-12 16:00:55 -04:00
CMakeLists.txt AK: Support UTF-16 string formatting 2025-07-18 12:45:38 -04:00
lit.cfg.py Everywhere: Format all python files with black 2025-05-22 16:21:42 +02:00
lit.site.cfg.py.in ClangPlugins: Change name of variable used for test compile options 2024-05-30 09:29:20 -06:00
requirements.txt Tests: Bump lit to version 18.1.8 for ClangPlugins tests 2025-05-12 16:00:55 -04:00