Index: compiled/String.h |
=================================================================== |
--- a/compiled/String.h |
+++ b/compiled/String.h |
@@ -107,16 +107,26 @@ public: |
bool equals(const String& other) const |
{ |
if (length() != other.length()) |
return false; |
return std::memcmp(mBuf, other.mBuf, sizeof(value_type) * length()) == 0; |
} |
+ bool operator==(const String& other) const |
+ { |
+ return equals(other); |
+ } |
+ |
+ bool operator!=(const String& other) const |
+ { |
+ return !equals(other); |
+ } |
+ |
size_type find(value_type c, size_type pos = 0) const |
{ |
for (size_type i = pos; i < length(); ++i) |
if (mBuf[i] == c) |
return i; |
return npos; |
} |