lib/mystring/mystring.cc
author "Tomas Zeman <tzeman@volny.cz>"
Wed, 16 Jan 2008 22:39:43 +0100
changeset 0 6f7a81934006
permissions -rw-r--r--
Imported vmailmgr-0.96.9

#include "mystring.h"
#include "trace.h"
#include <ctype.h>
#include <string.h>

#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);