length

Syntax:

    #include <string>
    size_type length() const;

The length() function returns the number of elements in the current string, performing the same role as the size() function.

Related Topics: capacity, empty, max_size, resize, size