std::basic_string_view
From cppreference.com
Defined in header <string_view>
|
||
template< class CharT, |
(since C++17) | |
The class template basic_string_view
describes an object that can refer to a constant contiguous sequence of CharT
with the first element of the sequence at position zero.
For a basic_string_view
str, pointers, iterators, and references to elements of str are invalidated when an operation invalidates a pointer in the range [
str.data(),
str.data() + str.size())
.
Every specialization of |
(since C++23) |
Several typedefs for common character types are provided:
Defined in header
<string_view> | |
Type | Definition |
std::string_view (C++17) | std::basic_string_view<char> |
std::wstring_view (C++17) | std::basic_string_view<wchar_t> |
std::u8string_view (C++20) | std::basic_string_view<char8_t> |
std::u16string_view (C++17) | std::basic_string_view<char16_t> |
std::u32string_view (C++17) | std::basic_string_view<char32_t> |
Contents |