diff options
| author | 2023-03-18 22:42:25 -0700 | |
|---|---|---|
| committer | 2023-03-18 22:42:25 -0700 | |
| commit | 00d401d6396b68b711b9e336aaa2fac5edb91a2d (patch) | |
| tree | ca3f4e0e99f865f039989901235756ecde5535b5 /src/common/string_util.h | |
| parent | Merge pull request #9966 from bunnei/bounded-polyfill (diff) | |
| download | yuzu-00d401d6396b68b711b9e336aaa2fac5edb91a2d.tar.gz yuzu-00d401d6396b68b711b9e336aaa2fac5edb91a2d.tar.xz yuzu-00d401d6396b68b711b9e336aaa2fac5edb91a2d.zip | |
common: string_util: Use std::string_view for UTF16ToUTF8/UTF8ToUTF16W.
Diffstat (limited to 'src/common/string_util.h')
| -rw-r--r-- | src/common/string_util.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/string_util.h b/src/common/string_util.h index f8aecc875..c351f1a0c 100644 --- a/src/common/string_util.h +++ b/src/common/string_util.h | |||
| @@ -36,12 +36,12 @@ bool SplitPath(const std::string& full_path, std::string* _pPath, std::string* _ | |||
| 36 | [[nodiscard]] std::string ReplaceAll(std::string result, const std::string& src, | 36 | [[nodiscard]] std::string ReplaceAll(std::string result, const std::string& src, |
| 37 | const std::string& dest); | 37 | const std::string& dest); |
| 38 | 38 | ||
| 39 | [[nodiscard]] std::string UTF16ToUTF8(const std::u16string& input); | 39 | [[nodiscard]] std::string UTF16ToUTF8(std::u16string_view input); |
| 40 | [[nodiscard]] std::u16string UTF8ToUTF16(const std::string& input); | 40 | [[nodiscard]] std::u16string UTF8ToUTF16(std::string_view input); |
| 41 | 41 | ||
| 42 | #ifdef _WIN32 | 42 | #ifdef _WIN32 |
| 43 | [[nodiscard]] std::string UTF16ToUTF8(const std::wstring& input); | 43 | [[nodiscard]] std::string UTF16ToUTF8(std::wstring_view input); |
| 44 | [[nodiscard]] std::wstring UTF8ToUTF16W(const std::string& str); | 44 | [[nodiscard]] std::wstring UTF8ToUTF16W(std::string_view str); |
| 45 | 45 | ||
| 46 | #endif | 46 | #endif |
| 47 | 47 | ||