The C++ strings library includes support for two general types of strings:
- std::basic_string - a templated class designed to manipulate strings of any character type.
- Null-terminated strings - arrays of characters terminated by a special null character.
The templated class std::basic_string generalizes how sequences of characters are manipulated and stored. String creation, manipulation, and destruction are all handled by a convenient set of class methods and related functions.
Several specializations of std::basic_string are provided for commonly-used types:
Defined in header
Null-terminated strings are arrays of characters that are terminated by a special null character. C++ provides functions to create, inspect, and modify null-terminated strings.
There are three types of null-terminated strings:
Template:ddcl list begin <tr class="t-dsc-header"><td>
<td></td> <td></td> <tr class="t-dcl "><td >
template<> class char_traits<std::u32string>;
<td class="t-dcl-nopad"> </td>
(since C++11) </td> </tr> Template:ddcl list end