aboutsummaryrefslogtreecommitdiff
path: root/include/cru/common/StringUtil.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-07-07 22:58:10 +0800
committercrupest <crupest@outlook.com>2020-07-07 22:58:10 +0800
commit1f6ae975355271bba248204f9930a93a51068f7c (patch)
treea82fb574589ea95721e711dda6474f9c63c5c820 /include/cru/common/StringUtil.hpp
parent3bf5b1fcf2315a1ce180ad69eb6bb1e57be37ca5 (diff)
downloadcru-1f6ae975355271bba248204f9930a93a51068f7c.tar.gz
cru-1f6ae975355271bba248204f9930a93a51068f7c.tar.bz2
cru-1f6ae975355271bba248204f9930a93a51068f7c.zip
...
Diffstat (limited to 'include/cru/common/StringUtil.hpp')
-rw-r--r--include/cru/common/StringUtil.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/cru/common/StringUtil.hpp b/include/cru/common/StringUtil.hpp
index b8edc302..39aa2d14 100644
--- a/include/cru/common/StringUtil.hpp
+++ b/include/cru/common/StringUtil.hpp
@@ -119,10 +119,11 @@ using Utf8CodePointIterator =
using Utf16CodePointIterator =
CodePointIterator<std::u16string_view, &Utf16NextCodePoint>;
-std::string ToUtf8(const std::u16string& s);
-inline std::string ToUtf8(std::u16string_view s) {
- return ToUtf8(std::u16string{s});
-}
+void Utf8EncodeCodePointAppend(CodePoint code_point, std::string& str);
+void Utf16EncodeCodePointAppend(CodePoint code_point, std::u16string& str);
+
+std::string ToUtf8(std::u16string_view s);
+std::u16string ToUtf16(std::string_view s);
// class Utf8Iterator : public Object {
// public: