This commit is contained in:
Yukino Song
2025-05-26 17:33:00 +08:00
parent 1e71cc0662
commit 542c4e315b
8 changed files with 93 additions and 24 deletions

15
tools/utils.h Normal file
View File

@@ -0,0 +1,15 @@
#include <string>
/**
* @brief Convert a UTF-8 string into a UTF-16 wide string.
* @param string The UTF-8 string.
* @return The converted UTF-16 wide string.
*/
std::wstring from_utf8(const std::string_view &string);
/**
* @brief Convert a UTF-16 wide string into a UTF-8 string.
* @param string The UTF-16 wide string.
* @return The converted UTF-8 string.
*/
std::string to_utf8(const std::wstring_view &string);