how to get the size of a substring in C++ code example Example: length of string in c++ str.length();