summaryrefslogtreecommitdiffstats
path: root/src/common/string_util.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-10-01 22:21:23 +0200
committerLiam <byteslice@airmail.cc>2023-10-02 01:22:08 +0200
commit38394f36d78f22ca75acf8275e86d25faecd0e8d (patch)
tree6c2710b6201abeae3cae96d8e1fa1eccbe92f8ab /src/common/string_util.cpp
parentMerge pull request #11646 from FernandoS27/stop-ignoring-your-mental-health (diff)
downloadyuzu-38394f36d78f22ca75acf8275e86d25faecd0e8d.tar
yuzu-38394f36d78f22ca75acf8275e86d25faecd0e8d.tar.gz
yuzu-38394f36d78f22ca75acf8275e86d25faecd0e8d.tar.bz2
yuzu-38394f36d78f22ca75acf8275e86d25faecd0e8d.tar.lz
yuzu-38394f36d78f22ca75acf8275e86d25faecd0e8d.tar.xz
yuzu-38394f36d78f22ca75acf8275e86d25faecd0e8d.tar.zst
yuzu-38394f36d78f22ca75acf8275e86d25faecd0e8d.zip
Diffstat (limited to '')
-rw-r--r--src/common/string_util.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp
index feab1653d..4c7aba3f5 100644
--- a/src/common/string_util.cpp
+++ b/src/common/string_util.cpp
@@ -135,6 +135,11 @@ std::u16string UTF8ToUTF16(std::string_view input) {
return convert.from_bytes(input.data(), input.data() + input.size());
}
+std::u32string UTF8ToUTF32(std::string_view input) {
+ std::wstring_convert<std::codecvt_utf8<char32_t>, char32_t> convert;
+ return convert.from_bytes(input.data(), input.data() + input.size());
+}
+
#ifdef _WIN32
static std::wstring CPToUTF16(u32 code_page, std::string_view input) {
const auto size =