diff options
| author | Liam Mitchell <[email protected]> | 2025-07-26 00:01:13 +0000 |
|---|---|---|
| committer | Liam Mitchell <[email protected]> | 2025-07-26 00:01:13 +0000 |
| commit | 10f6dc559688a650617b2e74eec039409f3d4687 (patch) | |
| tree | 551160a329487d4d45cd7aa1c39ece4a4e41bee0 /src/zencore/string.cpp | |
| parent | Upload vcpkg logs as artifacts on failure (diff) | |
| parent | Fix naming of service handle close guard variable (diff) | |
| download | zen-10f6dc559688a650617b2e74eec039409f3d4687.tar.xz zen-10f6dc559688a650617b2e74eec039409f3d4687.zip | |
Merge branch 'de/zen-service-command' of https://github.ol.epicgames.net/ue-foundation/zen into de/zen-service-command
Diffstat (limited to 'src/zencore/string.cpp')
| -rw-r--r-- | src/zencore/string.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/zencore/string.cpp b/src/zencore/string.cpp index 242d41abe..a0d8c927f 100644 --- a/src/zencore/string.cpp +++ b/src/zencore/string.cpp @@ -99,6 +99,20 @@ FilepathFindExtension(const std::string_view& Path, const char* ExtensionToMatch ////////////////////////////////////////////////////////////////////////// +bool +IsValidUtf8(const std::string_view& str) +{ + return utf8::is_valid(begin(str), end(str)); +} + +std::string_view::const_iterator +FindFirstInvalidUtf8Byte(const std::string_view& str) +{ + return utf8::find_invalid(begin(str), end(str)); +} + +////////////////////////////////////////////////////////////////////////// + void Utf8ToWide(const char8_t* Str8, WideStringBuilderBase& OutString) { |