#ifndef _H_CSTRING
#define _H_CSTRING

#include "utils.h"

class CString {
public:
  CString (void);
  CString (u_short);
  CString (c_char, u_short);
  ~CString (void);

  void operator = (c_char);
  void operator += (c_char);
  friend ostream &operator << (ostream &, const CString &);
  bool operator == (const CString &) const;
  bool operator == (c_char) const;
  bool operator |= (const CString &) const;
  bool operator |= (c_char) const;
  bool operator != (c_char) const;
  char &operator [] (u_short) const;
  operator bool (void) const;
  operator char * (void) const;

  u_short getlen (void) const;

private:
  char *str;
  u_short len, maxlen;

};

#endif
