#ifndef STRING_H
#define STRING_H
#include <string.h>
#include <iostream>
using namespace std;
class String {
public:
String(const char *s = 0) { set_str(s); }
String(const String& rhs) { set_str(rhs.str); }
~String(void) { delete [] str; }
const char *c_str(void) const { return (const char *) str; }
int length(void) const { return strlen(str); }
String& operator=(const char *rhs);
String& operator=(const String& rhs);
bool operator==(const String& rhs) const;
bool operator!=(const String& rhs) const;
bool operator<=(const String& rhs) const;
bool operator>=(const String& rhs) const;
bool operator<(const String& rhs) const;
bool operator>(const String& rhs) const;
const String operator+(const String& rhs) const;
private:
void set_str(const char *);
char *str;
};
istream& operator>>(istream& istr, String& s);
ostream& operator<<(ostream& ostr, const String& s);
#endif