C++ Language/Std/Strings/StringClass

From Wikibooks, open books for an open world
Jump to navigation Jump to search

An object-oriented approach to storing string data is C++'s std::string object, which can dynamically-grow because it implements many of the same functions as an STL vector. Instead of using '\0' to terminate string data, you can query its strVar.size() function.

  1. Construction
  2. Equality
  3. Indexing
  4. Inserting Characters
  5. Algorithms