logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

std::experimental::basic_string_view< _CharT, _Traits > - A non-owning reference to a string.

Author

       Generated automatically by Doxygen for libstdc++ from the source code.

                                                    libstdstd::experimental::bas...view<_CharT,_Traits>(3cxx)

Detailed Description

template<typename_CharT,typename_Traits=std::char_traits<_CharT>>
       class std::experimental::basic_string_view< _CharT, _Traits >"A non-owning reference to a string.

       TemplateParameters_CharT Type of character
           _Traits Traits for character type, defaults to char_traits<_CharT>.

       A basic_string_view looks like this:

       _CharT*    _M_str
       size_t     _M_len

Name

       std::experimental::basic_string_view< _CharT, _Traits > - A non-owning reference to a string.

Synopsis

       #include <>>

   PublicTypesusingconst_iterator = const _CharT *
       usingconst_pointer = const _CharT *
       usingconst_reference = const _CharT &
       usingconst_reverse_iterator = std::reverse_iterator< const_iterator >
       usingdifference_type = ptrdiff_t
       usingiterator = const_iterator
       usingpointer = _CharT *
       usingreference = _CharT &
       usingreverse_iterator = const_reverse_iteratorusingsize_type = size_t
       usingtraits_type = _Traits
       usingvalue_type = _CharT

   PublicMemberFunctions
       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) noexcept
       constexpr basic_string_view (const basic_string_view &) noexcept=default
       constexpr const _CharT & at (size_type __pos) const
       constexpr const _CharT & back () const
       constexpr const_iterator begin () const noexcept
       constexpr const_iterator cbegin () const noexcept
       constexpr const_iterator cend () const noexcept
       constexpr int compare (basic_string_view__str) const noexcept
       constexpr int compare (const _CharT *__str) const noexcept
       constexpr int compare (size_type __pos1, size_type __n1, basic_string_view__str) const
       constexpr int compare (size_type __pos1, size_type __n1, basic_string_view__str, size_type __pos2,
           size_type __n2) const
       constexpr int compare (size_type __pos1, size_type __n1, const _CharT *__str) const
       constexpr int compare (size_type __pos1, size_type __n1, const _CharT *__str, size_type __n2) const
       size_type copy (_CharT *__str, size_type __n, size_type __pos=0) const
       const_reverse_iteratorcrbegin () const noexcept
       const_reverse_iteratorcrend () const noexcept
       constexpr const _CharT * data () const noexcept
       constexpr bool empty () const noexcept
       constexpr const_iterator end () const noexcept
       constexpr size_type find (_CharT __c, size_type __pos=0) const noexcept
       constexpr size_type find (basic_string_view__str, size_type __pos=0) const noexcept
       constexpr size_type find (const _CharT *__str, size_type __pos, size_type __n) const noexcept
       constexpr size_type find (const _CharT *__str, size_type __pos=0) const noexcept
       constexpr size_type find_first_not_of (_CharT __c, size_type __pos=0) const noexcept
       constexpr size_type find_first_not_of (basic_string_view__str, size_type __pos=0) const noexcept
       constexpr size_type find_first_not_of (const _CharT *__str, size_type __pos, size_type __n) const
       constexpr size_type find_first_not_of (const _CharT *__str, size_type __pos=0) const noexcept
       constexpr size_type find_first_of (_CharT __c, size_type __pos=0) const noexcept
       constexpr size_type find_first_of (basic_string_view__str, size_type __pos=0) const noexcept
       constexpr size_type find_first_of (const _CharT *__str, size_type __pos, size_type __n) const
       constexpr size_type find_first_of (const _CharT *__str, size_type __pos=0) const noexcept
       constexpr size_type find_last_not_of (_CharT __c, size_type __pos=npos) const noexcept
       constexpr size_type find_last_not_of (basic_string_view__str, size_type __pos=npos) const noexcept
       constexpr size_type find_last_not_of (const _CharT *__str, size_type __pos, size_type __n) const
       constexpr size_type find_last_not_of (const _CharT *__str, size_type __pos=npos) const noexcept
       constexpr size_type find_last_of (_CharT __c, size_type __pos=npos) const noexcept
       constexpr size_type find_last_of (basic_string_view__str, size_type __pos=npos) const noexcept
       constexpr size_type find_last_of (const _CharT *__str, size_type __pos, size_type __n) const
       constexpr size_type find_last_of (const _CharT *__str, size_type __pos=npos) const noexcept
       constexpr const _CharT & front () const
       constexpr size_type length () const noexcept
       constexpr size_type max_size () const noexcept
       template<typename_Allocator > operatorbasic_string<_CharT,_Traits,_Allocator> () const
       basic_string_view & operator= (const basic_string_view &) noexcept=default
       constexpr const _CharT & operator[] (size_type __pos) const
       const_reverse_iteratorrbegin () const noexcept
       constexpr voidremove_prefix (size_type __n)
       constexpr voidremove_suffix (size_type __n)
       const_reverse_iteratorrend () const noexcept
       constexpr size_type rfind (_CharT __c, size_type __pos=npos) const noexcept
       constexpr size_type rfind (basic_string_view__str, size_type __pos=npos) const noexcept
       constexpr size_type rfind (const _CharT *__str, size_type __pos, size_type __n) const noexcept
       constexpr size_type rfind (const _CharT *__str, size_type __pos=npos) const noexcept
       constexpr size_type size () const noexcept
       constexpr basic_string_viewsubstr (size_type __pos=0, size_type __n=npos) const
       constexpr voidswap (basic_string_view &__sv) noexcept
       template<typename_Allocator  = std::allocator<_CharT>> basic_string< _CharT, _Traits, _Allocator >
           to_string (const _Allocator &__alloc=_Allocator()) const

   StaticPublicAttributesstatic constexpr size_type npos

See Also