libstdc++
std::experimental::fundamentals_v1::basic_string_view< _CharT, _Traits > Class Template Reference

Public Types

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_t
 
using iterator = const_iterator
 
using pointer = const _CharT *
 
using reference = const _CharT &
 
using reverse_iterator = const_reverse_iterator
 
using size_type = size_t
 
using traits_type = _Traits
 
using value_type = _CharT
 

Public Member Functions

constexpr basic_string_view (const basic_string_view &) noexcept=default
 
template<typename _Allocator >
 basic_string_view (const basic_string< _CharT, _Traits, _Allocator > &__str) noexcept
 
constexpr basic_string_view (const _CharT *__str)
 
constexpr basic_string_view (const _CharT *__str, size_type __len)
 
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
 
int compare (basic_string_view __str) const noexcept
 
int compare (size_type __pos1, size_type __n1, basic_string_view __str) const
 
int compare (size_type __pos1, size_type __n1, basic_string_view __str, size_type __pos2, size_type __n2) const
 
int compare (const _CharT *__str) const noexcept
 
int compare (size_type __pos1, size_type __n1, const _CharT *__str) const
 
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_iterator crbegin () const noexcept
 
const_reverse_iterator crend () const noexcept
 
constexpr const _CharT * data () const noexcept
 
constexpr bool empty () const noexcept
 
constexpr const_iterator end () const noexcept
 
size_type find (basic_string_view __str, size_type __pos=0) const noexcept
 
size_type find (_CharT __c, size_type __pos=0) const noexcept
 
size_type find (const _CharT *__str, size_type __pos, size_type __n) const noexcept
 
size_type find (const _CharT *__str, size_type __pos=0) const noexcept
 
size_type find_first_not_of (basic_string_view __str, size_type __pos=0) const noexcept
 
size_type find_first_not_of (_CharT __c, size_type __pos=0) const noexcept
 
size_type find_first_not_of (const _CharT *__str, size_type __pos, size_type __n) const
 
size_type find_first_not_of (const _CharT *__str, size_type __pos=0) const noexcept
 
size_type find_first_of (basic_string_view __str, size_type __pos=0) const noexcept
 
size_type find_first_of (_CharT __c, size_type __pos=0) const noexcept
 
size_type find_first_of (const _CharT *__str, size_type __pos, size_type __n) const
 
size_type find_first_of (const _CharT *__str, size_type __pos=0) const noexcept
 
size_type find_last_not_of (basic_string_view __str, size_type __pos=npos) const noexcept
 
size_type find_last_not_of (_CharT __c, size_type __pos=npos) const noexcept
 
size_type find_last_not_of (const _CharT *__str, size_type __pos, size_type __n) const
 
size_type find_last_not_of (const _CharT *__str, size_type __pos=npos) const noexcept
 
size_type find_last_of (basic_string_view __str, size_type __pos=npos) const noexcept
 
size_type find_last_of (_CharT __c, size_type __pos=npos) const noexcept
 
size_type find_last_of (const _CharT *__str, size_type __pos, size_type __n) const
 
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 >
 operator basic_string< _CharT, _Traits, _Allocator > () const
 
basic_string_viewoperator= (const basic_string_view &) noexcept=default
 
constexpr const _CharT & operator[] (size_type __pos) const
 
const_reverse_iterator rbegin () const noexcept
 
void remove_prefix (size_type __n)
 
void remove_suffix (size_type __n)
 
const_reverse_iterator rend () const noexcept
 
size_type rfind (basic_string_view __str, size_type __pos=npos) const noexcept
 
size_type rfind (_CharT __c, size_type __pos=npos) const noexcept
 
size_type rfind (const _CharT *__str, size_type __pos, size_type __n) const noexcept
 
size_type rfind (const _CharT *__str, size_type __pos=npos) const noexcept
 
constexpr size_type size () const noexcept
 
constexpr basic_string_view substr (size_type __pos, size_type __n=npos) const
 
void swap (basic_string_view &__sv) noexcept
 
template<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<typename _CharT, typename _Traits = std::char_traits<_CharT>>
class std::experimental::fundamentals_v1::basic_string_view< _CharT, _Traits >

A non-owning reference to a string.

Template Parameters
_CharTType of character
_TraitsTraits for character type, defaults to char_traits<_CharT>.

A basic_string_view looks like this:

1 _CharT* _M_str
2 size_t _M_len

Definition at line 76 of file string_view.


The documentation for this class was generated from the following files: