fix utf-8 decoder & add u32string functions
This commit is contained in:
+12
-2
@@ -23,11 +23,21 @@ namespace util {
|
||||
/// @return new UTF-8 encoded string
|
||||
std::string wstr2str_utf8(const std::wstring& ws);
|
||||
|
||||
/// @brief Decode UTF
|
||||
/// @brief Decode UTF-8 string
|
||||
/// @param s source encoded string
|
||||
/// @return new raw decoded string
|
||||
/// @return new raw decoded wstring
|
||||
std::wstring str2wstr_utf8(const std::string& s);
|
||||
|
||||
/// @brief Encode raw u32string to UTF-8
|
||||
/// @param ws source raw wstring
|
||||
/// @return new UTF-8 encoded string
|
||||
std::string u32str2str_utf8(const std::u32string& ws);
|
||||
|
||||
/// @brief Decode UTF-8 string
|
||||
/// @param s source encoded string
|
||||
/// @return new raw decoded u32string
|
||||
std::u32string str2u32str_utf8(const std::string& s);
|
||||
|
||||
/// @brief Calculated length of UTF-8 encoded string that fits into maxSize
|
||||
/// @param s source UTF-8 encoded string view
|
||||
/// @param maxSize max encoded string length after crop
|
||||
|
||||
Reference in New Issue
Block a user