diff options
Diffstat (limited to 'source/core')
| -rw-r--r-- | source/core/slang-string-slice-pool.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/core/slang-string-slice-pool.h b/source/core/slang-string-slice-pool.h index 765119360..15d204468 100644 --- a/source/core/slang-string-slice-pool.h +++ b/source/core/slang-string-slice-pool.h @@ -64,6 +64,11 @@ public: /// Add a string Handle add(const String& string) { return add(string.getUnownedSlice()); } + /// Add and get the result as a slice + Slice addAndGetSlice(const Slice& slice) { return getSlice(add(slice)); } + Slice addAndGetSlice(const char* chars) { return getSlice(add(chars)); } + Slice addAndGetSlice(const String& string) { return getSlice(add(string)); } + /// Returns true if found bool findOrAdd(const Slice& slice, Handle& outHandle); |
