summaryrefslogtreecommitdiffstats
path: root/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'source/core')
-rw-r--r--source/core/slang-string.cpp5
-rw-r--r--source/core/slang-string.h7
2 files changed, 12 insertions, 0 deletions
diff --git a/source/core/slang-string.cpp b/source/core/slang-string.cpp
index 2420cb7d7..b195e12d5 100644
--- a/source/core/slang-string.cpp
+++ b/source/core/slang-string.cpp
@@ -298,6 +298,11 @@ namespace Slang
append(slice.begin(), slice.end());
}
+ void String::append(UnownedStringSlice const& slice)
+ {
+ append(slice.begin(), slice.end());
+ }
+
void String::append(int32_t value, int radix)
{
enum { kCount = 33 };
diff --git a/source/core/slang-string.h b/source/core/slang-string.h
index 9f18554f6..894776ca6 100644
--- a/source/core/slang-string.h
+++ b/source/core/slang-string.h
@@ -193,6 +193,12 @@ namespace Slang
return (*this) == UnownedStringSlice(str, str + strlen(str));
}
+ bool operator!=(UnownedStringSlice const& other) const
+ {
+ return !(*this == other);
+ }
+
+
bool endsWith(UnownedStringSlice const& other) const;
bool endsWith(char const* str) const;
@@ -328,6 +334,7 @@ namespace Slang
void append(char chr);
void append(String const& str);
void append(StringSlice const& slice);
+ void append(UnownedStringSlice const& slice);
String(int32_t val, int radix = 10)
{