diff options
Diffstat (limited to 'source/core')
| -rw-r--r-- | source/core/slang-string.cpp | 6 | ||||
| -rw-r--r-- | source/core/slang-string.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/source/core/slang-string.cpp b/source/core/slang-string.cpp index 459396f69..9bc9e3a54 100644 --- a/source/core/slang-string.cpp +++ b/source/core/slang-string.cpp @@ -51,6 +51,12 @@ namespace Slang , endIndex(0) {} + StringSlice::StringSlice(String const& str) + : representation(str.buffer) + , beginIndex(0) + , endIndex(str.Length()) + {} + StringSlice::StringSlice(String const& str, UInt beginIndex, UInt endIndex) : representation(str.buffer) , beginIndex(beginIndex) diff --git a/source/core/slang-string.h b/source/core/slang-string.h index 552afe833..98fd51a07 100644 --- a/source/core/slang-string.h +++ b/source/core/slang-string.h @@ -155,6 +155,8 @@ namespace Slang public: StringSlice(); + StringSlice(String const& str); + StringSlice(String const& str, UInt beginIndex, UInt endIndex); UInt getLength() const |
