diff -r 000000000000 -r 6f7a81934006 lib/mystring/mystring.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/mystring/mystring.cc Wed Jan 16 22:39:43 2008 +0100 @@ -0,0 +1,28 @@ +#include "mystring.h" +#include "trace.h" +#include +#include + +#ifdef MYSTRING_TRACE +mystring::~mystring() +{ + trace("rep=" << (void*)rep); + rep->detach(); +} +#endif + +int mystring::operator!=(const char* in) const +{ + if(rep->buf == in) + return 0; + return strcmp(rep->buf, in); +} + +int mystring::operator!=(const mystring& in) const +{ + if(rep->buf == in.rep->buf) + return 0; + return strcmp(rep->buf, in.rep->buf); +} + +const mystring mystring::NUL("", 1);