diff options
Diffstat (limited to 'source/core/slang-string.h')
| -rw-r--r-- | source/core/slang-string.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/core/slang-string.h b/source/core/slang-string.h index 3fb612af3..10bc76048 100644 --- a/source/core/slang-string.h +++ b/source/core/slang-string.h @@ -93,6 +93,12 @@ namespace Slang return m_end; } + /// True if slice is strictly contained in memory. + bool isMemoryContained(const UnownedStringSlice& slice) const + { + return slice.m_begin >= m_begin && slice.m_end <= m_end; + } + Index getLength() const { return Index(m_end - m_begin); |
