std::basic_string
From cppreference.com
| Defined in header <string>
|
||
| template< class CharT, |
||
The class template basic_string stores and manipulates sequences of char-like objects (that is, objects for which a specialization of std::char_traits or compatible traits class is provided).
The elements of a basic_string are stored contiguously, that is, for a basic_string s, &*(s.begin() + n) == &*s.begin() + n for any n in [0, s.size()), or, equivalently, a pointer to s[0] can be passed to functions that expect a pointer to the first element of a CharT[] array. (since C++11)
Several specializations for common character types are provided:
| Defined in header
<string> | |
| Type | Definition |
| std::string | std::basic_string<char> |
| std::wstring | std::basic_string<wchar_t> |
| std::u16string (C++11) | std::basic_string<char16_t> |
| std::u32string (C++11) | std::basic_string<char32_t> |
Contents |