size

Syntax:

    #include <string>
    size_type size() const;

The size method returns the number of characters in the current string.

The size method usually runs in constant time.

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