From 1f6ae975355271bba248204f9930a93a51068f7c Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 7 Jul 2020 22:58:10 +0800 Subject: ... --- include/cru/common/PreConfig.hpp | 1 - include/cru/common/StringUtil.hpp | 9 +++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'include/cru/common') 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::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: -- cgit v1.2.3