The class basic_string is used to store and manipulate a sequence of character like types of varying length known as strings.
Memory for a string is allocated and deallocated as necessary by member functions.
The first element of the sequence is at position zero.
The iterators used by basic_string are random iterators and as such qualifies as a reversible container.
The class basic_string can have either of two implementations:
The interface and functionality are identical with both implementations. The only difference is performance. Which performs best is dependent upon usage patterns in each application.
The refcounted implementation ships as the default.