diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-02-04 23:33:07 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-02-04 23:33:07 +0000 |
| commit | 58336526043b3e1b4ce583f3392d261438b6eb35 (patch) | |
| tree | c563456f04b16aef8e693b1ba73e7da173702a0a /otk/ustring.cc | |
| parent | b8735c759a0a638a1169089c310baf9de6414597 (diff) | |
add operator==
Diffstat (limited to 'otk/ustring.cc')
| -rw-r--r-- | otk/ustring.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/otk/ustring.cc b/otk/ustring.cc index 7ac89bf7..7dbe8ece 100644 --- a/otk/ustring.cc +++ b/otk/ustring.cc @@ -229,6 +229,21 @@ ustring::value_type ustring::operator[](ustring::size_type i) const return utf8_get_char(utf8_offset_to_ptr(_string.data(), i)); } +bool ustring::operator==(const ustring &other) const +{ + return _string == other._string && _utf8 == other._utf8; +} + +bool ustring::operator==(const std::string &other) const +{ + return _string == other; +} + +bool ustring::operator==(const char *other) const +{ + return _string == other; +} + const char* ustring::data() const { return _string.data(); |
