Lesson 12 of 24
The string Class and String Problems
10 min 30 XP
C++ strings come with length(), substr(pos, len), find(), replace(), += to append and == to compare. reverse(s.begin(), s.end()) flips a string.
Example: edit me and press Run
Output Loading C++ (first time takes a few seconds)
Press Run to see the result here.