1 #include "mystring.h"
2 #include "trace.h"
3 #include <ctype.h>
4 #include <string.h>
5 
6 #ifdef MYSTRING_TRACE
~mystring()7 mystring::~mystring()
8 {
9   trace("rep=" << (void*)rep);
10   rep->detach();
11 }
12 #endif
13 
operator !=(const char * in) const14 int mystring::operator!=(const char* in) const
15 {
16   if(rep->buf == in)
17     return 0;
18   return strcmp(rep->buf, in);
19 }
20 
operator !=(const mystring & in) const21 int mystring::operator!=(const mystring& in) const
22 {
23   if(rep->buf == in.rep->buf)
24     return 0;
25   return strcmp(rep->buf, in.rep->buf);
26 }
27 
28 const mystring mystring::NUL("", 1);
29