find length of character in string in c++ code example Example: length of string in c++ str.length();