The purpose of this assignment is to continue practicing object oriented design with operator overloading. Your assignment is to build your own string library. As usual, you may not use the string library.
You should overload the following operators for your string class: ==
, !=
, +
, +=
, /
, >
, <
, >=
, <=
and the extraction and insertion operators >>
and <<
. The operators should behave as one would expect for strings of characters. String1 + String2
returns a string that’s the concatenation of String1
and String2
. Perhaps String1 / delimiters
returns an array of string tokens broken up by the delimiters specified.
Your string class should handle all dynamic memory. You should think carefully about what behavior would be appropriate for a string.
Along with your class, write a small driver program to test the class and turn in a write up documenting your class.