aboutsummaryrefslogtreecommitdiff
path: root/include/cru/common/StringUtil.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/common/StringUtil.hpp')
-rw-r--r--include/cru/common/StringUtil.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/cru/common/StringUtil.hpp b/include/cru/common/StringUtil.hpp
index 5dacfa12..276048f5 100644
--- a/include/cru/common/StringUtil.hpp
+++ b/include/cru/common/StringUtil.hpp
@@ -1,4 +1,5 @@
#pragma once
+#include <string>
#include "Base.hpp"
namespace cru {
@@ -124,4 +125,7 @@ void Utf16EncodeCodePointAppend(CodePoint code_point, std::u16string& str);
std::string ToUtf8(std::u16string_view s);
std::u16string ToUtf16(std::string_view s);
+
+// If given s is not a valid utf16 string, return value is UD.
+bool Utf16IsValidInsertPosition(std::u16string_view s, gsl::index position);
} // namespace cru