Interface
It’s a class so you get all the nice stuff:
- overloaded =, +, +=, ==, !=, <, >,[ ], <<, >> (skips over whitespace)
- constructors (default, cstring compatible, and copy)
- destructor
- getline (reads until ‘\n’ or uses char in optional 3rd argument)
- member functions:
- at - provides read/write access and does range checking
- substr - returns substring
- c_str - returns read only access to the cstring of data
- empty - test to see if the string is the empty string
- insert - inserts a string
- remove - removes substring
- find - returns index of substring in string
- about 90 more ...