diff options
| author | Yuqian Yang <crupest@crupest.life> | 2025-10-17 22:57:30 +0800 |
|---|---|---|
| committer | Yuqian Yang <crupest@crupest.life> | 2025-10-17 22:57:30 +0800 |
| commit | ca9334f53b9456a517f8fa4a687e2d2a6cc1ca86 (patch) | |
| tree | a49651d6af538f90f4033e1ff6361d309ed3fed9 /include/cru/base/StringUtil.h | |
| parent | 728d592f4075ae78b67dab6911ada05875a470a3 (diff) | |
| download | cru-ca9334f53b9456a517f8fa4a687e2d2a6cc1ca86.tar.gz cru-ca9334f53b9456a517f8fa4a687e2d2a6cc1ca86.tar.bz2 cru-ca9334f53b9456a517f8fa4a687e2d2a6cc1ca86.zip | |
Fix windows build.
Diffstat (limited to 'include/cru/base/StringUtil.h')
| -rw-r--r-- | include/cru/base/StringUtil.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/cru/base/StringUtil.h b/include/cru/base/StringUtil.h index 8c7841d7..a69bb884 100644 --- a/include/cru/base/StringUtil.h +++ b/include/cru/base/StringUtil.h @@ -380,4 +380,9 @@ Index Utf8IndexCodeUnitToCodePoint(const Utf8CodeUnit* ptr, Index size, Index po Index Utf8IndexCodePointToCodeUnit(const Utf8CodeUnit* ptr, Index size, Index position); Index Utf16IndexCodeUnitToCodePoint(const Utf16CodeUnit* ptr, Index size, Index position); Index Utf16IndexCodePointToCodeUnit(const Utf16CodeUnit* ptr, Index size, Index position); + +#ifdef _WIN32 +std::wstring ToUtf16(std::string_view str); +std::string ToUtf8(std::wstring_view str); +#endif } // namespace cru::string |
