https://en.cppreference.com/w/cpp/string
The C++ strings library includes support for three general types of strings:
- a templated class designed to manipulate strings of any character type.
- a lightweight non-owning read-only view into a subsequence of a string.
The templated class
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
are provided for commonly-used types:
|
}}
|
}}
|
}}
|
}}
|
}}
The templated class
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
.
Several specializations of
are provided for commonly-used types:
|
}}
|
}}
|
}}
|
}}
|
}}
}}
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:
The string library also provides class template
that defines types and functions for
}}. The following specializations are defined:
The localizations library provides support for string conversions (e.g.
or
) as well as functions that classify characters (e.g.
or
).