__gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >(3Library Functions Manua__gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >(3)
NAME
__gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > -
SYNOPSIS
Inherits _Base< _CharT, _Traits, _Alloc >.
Public Types
typedef _Alloc allocator_type
typedef
__gnu_cxx::__normal_iterator
< const_pointer,
__versa_string > const_iterator"
typedef
_CharT_alloc_type::const_pointer const_pointer"
typedef const value_type & const_reference
typedef std::reverse_iterator
< const_iterator > const_reverse_iterator"
typedef
_CharT_alloc_type::difference_type difference_type"
typedef
__gnu_cxx::__normal_iterator
< pointer, __versa_string > iterator"
typedef _CharT_alloc_type::pointer pointer
typedef value_type & reference
typedef std::reverse_iterator
< iterator > reverse_iterator"
typedef
_CharT_alloc_type::size_type size_type"
typedef _Traits traits_type
typedef _Traits::char_type value_type
Public Member Functions
__versa_string ()
__versa_string (const _Alloc &__a)
__versa_string (const __versa_string &__str)
__versa_string (__versa_string &&__str) noexcept
__versa_string (std::initializer_list< _CharT > __l, const _Alloc &__a=_Alloc())
__versa_string (const __versa_string &__str, size_type __pos, size_type __n=npos)
__versa_string (const __versa_string &__str, size_type __pos, size_type __n, const _Alloc &__a)
__versa_string (const _CharT *__s, size_type __n, const _Alloc &__a=_Alloc())
template<typename _InputIterator > __versa_string< _CharT,
_Traits, _Alloc, _Base > & _M_replace_dispatch (iterator __i1, iterator __i2, _InputIterator __k1, _InputIterator __k2,
std::__false_type)"
__versa_string & append (const __versa_string &__str)
__versa_string & append (const __versa_string &__str, size_type __pos, size_type __n)
__versa_string & append (const _CharT *__s, size_type __n)
__versa_string & append (const _CharT *__s)
__versa_string & append (size_type __n, _CharT __c)
__versa_string & append (std::initializer_list< _CharT > __l)
template<class _InputIterator , typename = std::_RequireInputIter<_InputIterator>> __versa_string & append (_InputIterator __first,
_InputIterator __last)
__versa_string & assign (const __versa_string &__str)
__versa_string & assign (__versa_string &&__str)
__versa_string & assign (const __versa_string &__str, size_type __pos, size_type __n)
__versa_string & assign (const _CharT *__s, size_type __n)
__versa_string & assign (const _CharT *__s)
__versa_string & assign (size_type __n, _CharT __c)
template<class _InputIterator , typename = std::_RequireInputIter<_InputIterator>> __versa_string & assign (_InputIterator __first,
_InputIterator __last)
__versa_string & assign (std::initializer_list< _CharT > __l)
const_reference at (size_type __n) const
reference at (size_type __n)
reference back ()
const_reference back () const
const _CharT * c_str () const noexcept
size_type capacity () const noexcept
void clear () noexcept
int compare (const __versa_string &__str) const
int compare (size_type __pos, size_type __n, const __versa_string &__str) const
int compare (size_type __pos1, size_type __n1, const __versa_string &__str, size_type __pos2, size_type __n2) const
int compare (const _CharT *__s) const
int compare (size_type __pos, size_type __n1, const _CharT *__s) const
int compare (size_type __pos, size_type __n1, const _CharT *__s, size_type __n2) const
size_type copy (_CharT *__s, size_type __n, size_type __pos=0) const
const _CharT * data () const noexcept
bool empty () const noexcept
__versa_string & erase (size_type __pos=0, size_type __n=npos)
iterator erase (iterator __position)
iterator erase (iterator __first, iterator __last)
size_type find (const _CharT *__s, size_type __pos, size_type __n) const
size_type find (const __versa_string &__str, size_type __pos=0) const noexcept
size_type find (const _CharT *__s, size_type __pos=0) const
size_type find (_CharT __c, size_type __pos=0) const noexcept
size_type find_first_not_of (const __versa_string &__str, size_type __pos=0) const noexcept
size_type find_first_not_of (const _CharT *__s, size_type __pos, size_type __n) const
size_type find_first_not_of (const _CharT *__s, size_type __pos=0) const
size_type find_first_not_of (_CharT __c, size_type __pos=0) const noexcept
size_type find_first_of (const __versa_string &__str, size_type __pos=0) const noexcept
size_type find_first_of (const _CharT *__s, size_type __pos, size_type __n) const
size_type find_first_of (const _CharT *__s, size_type __pos=0) const
size_type find_first_of (_CharT __c, size_type __pos=0) const noexcept
size_type find_last_not_of (const __versa_string &__str, size_type __pos=npos) const noexcept
size_type find_last_not_of (const _CharT *__s, size_type __pos, size_type __n) const
size_type find_last_not_of (const _CharT *__s, size_type __pos=npos) const
size_type find_last_not_of (_CharT __c, size_type __pos=npos) const noexcept
size_type find_last_of (const __versa_string &__str, size_type __pos=npos) const noexcept
size_type find_last_of (const _CharT *__s, size_type __pos, size_type __n) const
size_type find_last_of (const _CharT *__s, size_type __pos=npos) const
size_type find_last_of (_CharT __c, size_type __pos=npos) const noexcept
reference front ()
const_reference front () const
allocator_type get_allocator () const noexcept
void insert (iterator __p, size_type __n, _CharT __c)
template<class _InputIterator , typename = std::_RequireInputIter<_InputIterator>> void insert (iterator __p, _InputIterator __beg,
_InputIterator __end)
void insert (iterator __p, std::initializer_list< _CharT > __l)
__versa_string & insert (size_type __pos1, const __versa_string &__str)
__versa_string & insert (size_type __pos1, const __versa_string &__str, size_type __pos2, size_type __n)
__versa_string & insert (size_type __pos, const _CharT *__s, size_type __n)
__versa_string & insert (size_type __pos, const _CharT *__s)
__versa_string & insert (size_type __pos, size_type __n, _CharT __c)
iterator insert (iterator __p, _CharT __c)
__versa_string & operator+= (const __versa_string &__str)
__versa_string & operator+= (const _CharT *__s)
__versa_string & operator+= (_CharT __c)
__versa_string & operator+= (std::initializer_list< _CharT > __l)
const_reference operator[] (size_type __pos) const
reference operator[] (size_type __pos)
void pop_back ()
void push_back (_CharT __c)
__versa_string & replace (size_type __pos, size_type __n, const __versa_string &__str)
__versa_string & replace (size_type __pos1, size_type __n1, const __versa_string &__str, size_type __pos2, size_type __n2)
__versa_string & replace (size_type __pos, size_type __n1, const _CharT *__s, size_type __n2)
__versa_string & replace (size_type __pos, size_type __n1, const _CharT *__s)
__versa_string & replace (size_type __pos, size_type __n1, size_type __n2, _CharT __c)
__versa_string & replace (iterator __i1, iterator __i2, const __versa_string &__str)
__versa_string & replace (iterator __i1, iterator __i2, const _CharT *__s, size_type __n)
__versa_string & replace (iterator __i1, iterator __i2, const _CharT *__s)
__versa_string & replace (iterator __i1, iterator __i2, size_type __n, _CharT __c)
template<class _InputIterator , typename = std::_RequireInputIter<_InputIterator>> __versa_string & replace (iterator __i1, iterator __i2,
_InputIterator __k1, _InputIterator __k2)
__versa_string & replace (iterator __i1, iterator __i2, _CharT *__k1, _CharT *__k2)
__versa_string & replace (iterator __i1, iterator __i2, const _CharT *__k1, const _CharT *__k2)
__versa_string & replace (iterator __i1, iterator __i2, iterator __k1, iterator __k2)
__versa_string & replace (iterator __i1, iterator __i2, const_iterator __k1, const_iterator __k2)
__versa_string & replace (iterator __i1, iterator __i2, std::initializer_list< _CharT > __l)
void reserve (size_type __res_arg=0)
void resize (size_type __n)
size_type rfind (const __versa_string &__str, size_type __pos=npos) const noexcept
size_type rfind (const _CharT *__s, size_type __pos, size_type __n) const
size_type rfind (const _CharT *__s, size_type __pos=npos) const
size_type rfind (_CharT __c, size_type __pos=npos) const noexcept
void shrink_to_fit ()
__versa_string substr (size_type __pos=0, size_type __n=npos) const
void swap (__versa_string &__s)
__s __s traits_type::length (__s)
Public Attributes
__a
__c
__pad0__: __vstring_base(__s
__pad1__: __vstring_base(__n
Static Public Attributes
static const size_type npos
Detailed Description
template<typename _CharT, typename _Traits, typename _Alloc, template< typename, typename, typename > class _Base>class
__gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >
Template class __versa_string.
Data structure managing sequences of characters and character-like objects.
Definition at line 56 of file vstring.h.
Constructor & Destructor Documentation
template<typename _CharT, typename _Traits, typename _Alloc, template< typename, typename, typename > class _Base> __gnu_cxx::__versa_string<
_CharT, _Traits, _Alloc, _Base >::__versa_string () [inline]
Default constructor creates an empty string.
Definition at line 134 of file vstring.h.
Referenced by __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::substr().
template<typename _CharT, typename _Traits, typename _Alloc, template< typename, typename, typename > class _Base> __gnu_cxx::__versa_string<
_CharT, _Traits, _Alloc, _Base >::__versa_string (const _Alloc &__a) [inline], [explicit]
Construct an empty string using allocator a.
Definition at line 141 of file vstring.h.
template<typename _CharT, typename _Traits, typename _Alloc, template< typename, typename, typename > class _Base> __gnu_cxx::__versa_string<
_CharT, _Traits, _Alloc, _Base >::__versa_string (const __versa_string< _CharT, _Traits, _Alloc, _Base > &__str) [inline]
Construct string with copy of value of __str.
Parameters:
__str Source string.
Definition at line 149 of file vstring.h.
template<typename _CharT, typename _Traits, typename _Alloc, template< typename, typename, typename > class _Base> __gnu_cxx::__versa_string<
_CharT, _Traits, _Alloc, _Base >::__versa_string (__versa_string< _CharT, _Traits, _Alloc, _Base > &&__str) [inline], [noexcept]
String move constructor.
Parameters:
__str Source string.
The newly-constructed string contains the exact contents of __str. The contents of __str are a valid, but unspecified string.
Definition at line 161 of file vstring.h.
template<typename _CharT, typename _Traits, typename _Alloc, template< typename, typename, typename > class _Base> __gnu_cxx::__versa_string<
_CharT, _Traits, _Alloc, _Base >::__versa_string (std::initializer_list< _CharT >__l, const _Alloc &__a = _Alloc()) [inline]
Construct string from an initializer list.
Parameters:
__l std::initializer_list of characters.
__a Allocator to use (default is default allocator).
Definition at line 169 of file vstring.h.
template<typename _CharT, typename _Traits, typename _Alloc, template< typename, typename, typename > class _Base> __gnu_cxx::__versa_string<
_CharT, _Traits, _Alloc, _Base >::__versa_string (const __versa_string< _CharT, _Traits, _Alloc, _Base > &__str, size_type__pos,
size_type__n = npos) [inline]
Construct string as copy of a substring.
Parameters:
__str Source string.
__pos Index of first character to copy from.
__n Number of characters to copy (default remainder).
Definition at line 180 of file vstring.h.
template<typename _CharT, typename _Traits, typename _Alloc, template< typename, typename, typename > class _Base> __gnu_cxx::__versa_string<
_CharT, _Traits, _Alloc, _Base >::__versa_string (const __versa_string< _CharT, _Traits, _Alloc, _Base > &__str, size_type__pos,
size_type__n, const _Alloc &__a) [inline]
Construct string as copy of a substring.
Parameters:
__str Source string.
__pos Index of first character to copy from.
__n Number of characters to copy.
__a Allocator to use.
Definition at line 195 of file vstring.h.
template<typename _CharT, typename _Traits, typename _Alloc, template< typename, typename, typename > class _Base> __gnu_cxx::__versa_string<
_CharT, _Traits, _Alloc, _Base >::__versa_string (const _CharT *__s, size_type__n, const _Alloc &__a = _Alloc()) [inline]
Construct string initialized by a character array.
Parameters:
__s Source character array.
__n Number of characters to copy.
__a Allocator to use (default is default allocator).
NB: __s must have at least __n characters, '