cpp/string

The C++ strings library includes support for three general types of strings:


 * std - a templated class designed to manipulate strings of any character type.
 * std - a lightweight non-owning read-only view into a subsequence of a string.
 * Null-terminated strings - arrays of characters terminated by a special null character.

std
The templated class std 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 are provided for commonly-used types:

{{rrev|since=c++17|

The templated class std provides a lightweight object that offers read-only access to a string or a part of a string using an interface similar to the interface of std.

Several specializations of std are provided for commonly-used types:

}}

Null-terminated strings
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:



std
The string library also provides class template std that defines types and functions for std. The following specializations are defined:

Conversions and classification
The localizations library provides support for string conversions (e.g. std or std) as well as functions that classify characters (e.g. std or std).