STD::EXPERIMENTAL::BASIC_STRING_VIEW(3cxx)
β¨ NAME β¨
std::experimental::basic_string_view< _CharT, _Traits > β A non-owning reference to a string. Bestie, this is the std::experimental::basic_string_view< _CharT, _Traits >(3cxx) manual page, and it is literally giving "I see the string but I do not own the string" energy π
β¨
π SYNOPSIS π
#include <> >
π Public Types π
Okay so here is the whole type-alias squad, verbatim because names matter:
using const_iterator = const _CharT *using const_pointer = const _CharT *using const_reference = const _CharT &using const_reverse_iterator = std::reverse_iterator< const_iterator >using difference_type = ptrdiff_tusing iterator = const_iteratorusing pointer = _CharT *using reference = _CharT &using reverse_iterator = const_reverse_iteratorusing size_type = size_tusing traits_type = _Traitsusing value_type = _CharT
π Public Member Functions π
Every overload is invited to the group chat β no plus-ones skipped, no cap:
constexpr basic_string_view (const _CharT *__str)constexpr basic_string_view (const _CharT *__str, size_type __len)template<typename _Allocator > basic_string_view (const basic_string< _CharT, _Traits, _Allocator > &__str) noexceptconstexpr basic_string_view (const basic_string_view &) noexcept=defaultconstexpr const _CharT & at (size_type __pos) constconstexpr const _CharT & back () constconstexpr const_iterator begin () const noexceptconstexpr const_iterator cbegin () const noexceptconstexpr const_iterator cend () const noexceptconstexpr int compare (basic_string_view __str) const noexceptconstexpr int compare (const _CharT *__str) const noexceptconstexpr int compare (size_type __pos1, size_type __n1, basic_string_view __str) constconstexpr int compare (size_type __pos1, size_type __n1, basic_string_view __str, size_type __pos2, size_type __n2) constconstexpr int compare (size_type __pos1, size_type __n1, const _CharT *__str) constconstexpr int compare (size_type __pos1, size_type __n1, const _CharT *__str, size_type __n2) constsize_type copy (_CharT *__str, size_type __n, size_type __pos=0) constconst_reverse_iterator crbegin () const noexceptconst_reverse_iterator crend () const noexceptconstexpr const _CharT * data () const noexceptconstexpr bool empty () const noexceptconstexpr const_iterator end () const noexceptconstexpr size_type find (_CharT __c, size_type __pos=0) const noexceptconstexpr size_type find (basic_string_view __str, size_type __pos=0) const noexceptconstexpr size_type find (const _CharT *__str, size_type __pos, size_type __n) const noexceptconstexpr size_type find (const _CharT *__str, size_type __pos=0) const noexceptconstexpr size_type find_first_not_of (_CharT __c, size_type __pos=0) const noexceptconstexpr size_type find_first_not_of (basic_string_view __str, size_type __pos=0) const noexceptconstexpr size_type find_first_not_of (const _CharT *__str, size_type __pos, size_type __n) constconstexpr size_type find_first_not_of (const _CharT *__str, size_type __pos=0) const noexceptconstexpr size_type find_first_of (_CharT __c, size_type __pos=0) const noexceptconstexpr size_type find_first_of (basic_string_view __str, size_type __pos=0) const noexceptconstexpr size_type find_first_of (const _CharT *__str, size_type __pos, size_type __n) constconstexpr size_type find_first_of (const _CharT *__str, size_type __pos=0) const noexceptconstexpr size_type find_last_not_of (_CharT __c, size_type __pos=npos) const noexceptconstexpr size_type find_last_not_of (basic_string_view __str, size_type __pos=npos) const noexceptconstexpr size_type find_last_not_of (const _CharT *__str, size_type __pos, size_type __n) constconstexpr size_type find_last_not_of (const _CharT *__str, size_type __pos=npos) const noexceptconstexpr size_type find_last_of (_CharT __c, size_type __pos=npos) const noexceptconstexpr size_type find_last_of (basic_string_view __str, size_type __pos=npos) const noexceptconstexpr size_type find_last_of (const _CharT *__str, size_type __pos, size_type __n) constconstexpr size_type find_last_of (const _CharT *__str, size_type __pos=npos) const noexceptconstexpr const _CharT & front () constconstexpr size_type length () const noexceptconstexpr size_type max_size () const noexcepttemplate<typename _Allocator > operator basic_string< _CharT, _Traits, _Allocator > () constbasic_string_view & operator= (const basic_string_view &) noexcept=defaultconstexpr const _CharT & operator[] (size_type __pos) constconst_reverse_iterator rbegin () const noexceptconstexpr void remove_prefix (size_type __n)constexpr void remove_suffix (size_type __n)const_reverse_iterator rend () const noexceptconstexpr size_type rfind (_CharT __c, size_type __pos=npos) const noexceptconstexpr size_type rfind (basic_string_view __str, size_type __pos=npos) const noexceptconstexpr size_type rfind (const _CharT *__str, size_type __pos, size_type __n) const noexceptconstexpr size_type rfind (const _CharT *__str, size_type __pos=npos) const noexceptconstexpr size_type size () const noexceptconstexpr basic_string_view substr (size_type __pos=0, size_type __n=npos) constconstexpr void swap (basic_string_view &__sv) noexcepttemplate<typename _Allocator = std::allocator<_CharT>> basic_string< _CharT, _Traits, _Allocator > to_string (const _Allocator &__alloc=_Allocator()) const
π¦ Static Public Attributes π¦
static constexpr size_type npos
π Detailed Description π
Template time, bestie. The class shape is:
template<typename _CharT, typename _Traits = std::char_traits<_CharT>>
class std::experimental::basic_string_view< _CharT, _Traits >"A non-
owning reference to a string.
πΈ Template Parameters πΈ
_CharTβ Type of character_Traitsβ Traits for character type, defaults tochar_traits<_CharT>.
A basic_string_view looks like this:
_CharT* _M_str
size_t _M_len
π Author π
Generated automatically by Doxygen for libstdc++ from the source code.
Signed off from the footer corner: libstdc++, manual tag 3cxx, and the date slot is not present in this copy. Stay non-owning and iconic, bestie πβ¨π«Ά
π¦ where this page comes from
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms