diff options
author | Timothy Flynn <trflynn89@pm.me> | 2021-08-09 11:53:28 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-10 23:07:50 +0200 |
commit | c16aca7abf801a9d4da3d882b9e45ffcb35cd304 (patch) | |
tree | 011fac5c4e2cc44a283afa2812c0c8f9dc384af9 /AK/StringBuilder.h | |
parent | 5978caf96bce2a49b77262042078265e96f4805a (diff) | |
download | serenity-c16aca7abf801a9d4da3d882b9e45ffcb35cd304.zip |
AK+Kernel: Add StringBuilder::append overload for UTF-16 views
Currently, to append a UTF-16 view to a StringBuilder, callers must
first convert the view to UTF-8 and then append the copy. Add a UTF-16
overload so callers do not need to hold an entire copy in memory.
Diffstat (limited to 'AK/StringBuilder.h')
-rw-r--r-- | AK/StringBuilder.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/AK/StringBuilder.h b/AK/StringBuilder.h index 0bc99c450b..6f3d0b5380 100644 --- a/AK/StringBuilder.h +++ b/AK/StringBuilder.h @@ -22,6 +22,7 @@ public: ~StringBuilder() = default; void append(StringView const&); + void append(Utf16View const&); void append(Utf32View const&); void append(char); void append_code_point(u32); |