diff options
Diffstat (limited to 'include/StringView.hpp')
-rw-r--r-- | include/StringView.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/StringView.hpp b/include/StringView.hpp index 9eea387..45d0f5b 100644 --- a/include/StringView.hpp +++ b/include/StringView.hpp @@ -52,6 +52,16 @@ namespace dchat return memcmp(data, other.data, size * sizeof(CharType)) == 0; } + bool operator == (const BasicStringView<CharType> &other) const + { + return equals(other); + } + + bool operator != (const BasicStringView<CharType> &other) const + { + return !equals(other); + } + CharType operator [] (usize index) const { assert(index < size); |