diff options
author | crupest <crupest@outlook.com> | 2020-07-07 22:58:10 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-07-07 22:58:10 +0800 |
commit | 1f6ae975355271bba248204f9930a93a51068f7c (patch) | |
tree | a82fb574589ea95721e711dda6474f9c63c5c820 /include/cru/common | |
parent | 3bf5b1fcf2315a1ce180ad69eb6bb1e57be37ca5 (diff) | |
download | cru-1f6ae975355271bba248204f9930a93a51068f7c.tar.gz cru-1f6ae975355271bba248204f9930a93a51068f7c.tar.bz2 cru-1f6ae975355271bba248204f9930a93a51068f7c.zip |
...
Diffstat (limited to 'include/cru/common')
-rw-r--r-- | include/cru/common/PreConfig.hpp | 1 | ||||
-rw-r--r-- | include/cru/common/StringUtil.hpp | 9 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/cru/common/PreConfig.hpp b/include/cru/common/PreConfig.hpp index 802f17f8..4bccef1d 100644 --- a/include/cru/common/PreConfig.hpp +++ b/include/cru/common/PreConfig.hpp @@ -6,4 +6,3 @@ #endif #define _CRT_SECURE_NO_WARNINGS -#define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING 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: |