const MyString MyString::operator=(MyString &right) { if (len != 0) delete [] str; str = new char[right.length() + 1]; strcpy(str, right.getValue()); len = right.length(); return *this; }
bool MyString::operator<=(MyString &right) { bool status; if (strcmp(str, right.getValue()) <= 0) status = true; else status = false; return status; }
const MyString MyString::operator+=(MyString &right) { char *temp = str; str = new char[strlen(str) + right.length() + 1]; strcpy(str, temp); strcat(str, right.getValue()); if (len != 0) delete [] temp; len = strlen(str); return *this; }
int MyString::operator==(MyString &right) { return !strcmp(str, right.getValue()); }