diff options
Diffstat (limited to 'source/core/slang-string.h')
| -rw-r--r-- | source/core/slang-string.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/core/slang-string.h b/source/core/slang-string.h index 80eb00605..448b351aa 100644 --- a/source/core/slang-string.h +++ b/source/core/slang-string.h @@ -141,6 +141,16 @@ namespace Slang memcpy(buffer.Ptr(), str, length + 1); } } + String(const char* textBegin, char const* textEnd) + { + if (textBegin != textEnd) + { + length = (int)(textEnd - textBegin); + buffer = new char[length + 1]; + memcpy(buffer.Ptr(), textBegin, length + 1); + buffer.Ptr()[length] = 0; + } + } String(char chr) { if (chr) |
