X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Fustring.cc;h=8ffe07fe000ba7c5febf3639b1fd7cf3f7151633;hb=1e58c863bbaddd2f2dbebfde740ca842e8837a1c;hp=7ac89bf72759ee351754ef88060bd96d51cbecdb;hpb=a7207b7d8367af47ddb7e2733cb963148fd0379f;p=chaz%2Fopenbox diff --git a/otk/ustring.cc b/otk/ustring.cc index 7ac89bf7..8ffe07fe 100644 --- a/otk/ustring.cc +++ b/otk/ustring.cc @@ -1,14 +1,10 @@ // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- -#ifdef HAVE_CONFIG_H -# include "../config.h" -#endif // HAVE_CONFIG_H +#include "config.h" #include "ustring.hh" -extern "C" { -#include -} +#include namespace otk { @@ -229,6 +225,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();