Header Reference: <string_view>
Header Reference: <string_view>
Non-owning string views, borrowed text access, and string-like observation utilities from <string_view>.
Header Reference: <string_view>
Non-owning string views, borrowed text access, and string-like observation utilities from <string_view>.
Use reference pages to confirm names, categories, nearby facilities, and the constraints that matter before writing or reviewing code.
Header reference pages are meant to answer a practical question quickly: what this header provides, when to reach for it, and which usage rules are easiest to get wrong.
<string_view>std::basic_string_view<CharT, Traits>std::string_view, std::wstring_view, std::u8string_view, std::u16string_view, std::u32string_viewUse <string_view> for cheap non-owning text parameters and slices over existing character storage.
std::string, and contiguous buffers#include <string-view>
int main() {
// Start with the primary facility from <string-view>.
// Then verify lifetime, invalidation, ordering, or error-handling rules.
return 0;
}