aboutsummaryrefslogtreecommitdiff
path: root/include/cru/common
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/common')
-rw-r--r--include/cru/common/String.hpp7
-rw-r--r--include/cru/common/StringUtil.hpp2
2 files changed, 9 insertions, 0 deletions
diff --git a/include/cru/common/String.hpp b/include/cru/common/String.hpp
index ade2d84b..bd079243 100644
--- a/include/cru/common/String.hpp
+++ b/include/cru/common/String.hpp
@@ -165,6 +165,10 @@ class CRU_BASE_API String {
}
inline void append(StringView str);
+ String substr(size_type start, size_type size) const {
+ return String(this->buffer_ + start, size);
+ }
+
public:
String& operator+=(value_type value) {
this->append(value);
@@ -177,6 +181,9 @@ class CRU_BASE_API String {
}
public:
+ String& TrimEnd();
+
+ public:
void AppendCodePoint(CodePoint code_point);
Utf16CodePointIterator CodePointIterator() const {
diff --git a/include/cru/common/StringUtil.hpp b/include/cru/common/StringUtil.hpp
index 6c6b47b8..a35da695 100644
--- a/include/cru/common/StringUtil.hpp
+++ b/include/cru/common/StringUtil.hpp
@@ -221,4 +221,6 @@ Index CRU_BASE_API Utf16NextWord(const char16_t* ptr, Index size,
char16_t CRU_BASE_API ToLower(char16_t c);
char16_t CRU_BASE_API ToUpper(char16_t c);
+
+char16_t CRU_BASE_API IsWhitespace(char16_t c);
} // namespace cru