Length of a string
The length of a
string can be retrieved with member function size and with member function length . The subscript operator,
 (which does not perform bounds checking), can be used with
strings to access and modify individual characters. A
string object has a first subscript of
0 and a last subscript of
size() – 1.