Some More String Operators
- length, size
- find (substring)
- Returns the position of the substring within the string
- starting from position 0
- string::nopos if it is not found
- name.find("Wo");
- substr(start, length);
- Returns a string, starting at position start of length lenght.
- Strings are numbered from position 0
- name.substr(2,4);
Read the Software engineering tip on page 127
Read testing and debugging on page 131
Do exercise 3, page 137
Do Exercise 4, page 190