.TH "__gnu_debug::basic_string< _CharT, _Traits, _Allocator >" 3cxx "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME __gnu_debug::basic_string< _CharT, _Traits, _Allocator > \- Class std::basic_string with safety/checking/debug instrumentation\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fB__gnu_debug::_Safe_container< _SafeContainer, _Alloc, _SafeBase, _IsCxx11AllocatorAware >\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "typedef _Allocator \fBallocator_type\fP" .br .ti -1c .RI "typedef \fB__gnu_debug::_Safe_iterator\fP< typename _Base::const_iterator, \fBbasic_string\fP > \fBconst_iterator\fP" .br .ti -1c .RI "typedef _Base::const_pointer \fBconst_pointer\fP" .br .ti -1c .RI "typedef _Base::const_reference \fBconst_reference\fP" .br .ti -1c .RI "typedef \fBstd::reverse_iterator\fP< \fBconst_iterator\fP > \fBconst_reverse_iterator\fP" .br .ti -1c .RI "typedef _Base::difference_type \fBdifference_type\fP" .br .ti -1c .RI "typedef \fB__gnu_debug::_Safe_iterator\fP< typename _Base::iterator, \fBbasic_string\fP > \fBiterator\fP" .br .ti -1c .RI "typedef \fB_Base::pointer\fP \fBpointer\fP" .br .ti -1c .RI "typedef _Base::reference \fBreference\fP" .br .ti -1c .RI "typedef \fBstd::reverse_iterator\fP< \fBiterator\fP > \fBreverse_iterator\fP" .br .ti -1c .RI "typedef _Base::size_type \fBsize_type\fP" .br .ti -1c .RI "typedef _Traits \fBtraits_type\fP" .br .ti -1c .RI "typedef _Traits::char_type \fBvalue_type\fP" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBbasic_string\fP (\fB_Base\fP &&\fB__base\fP) noexcept" .br .ti -1c .RI "template \fBbasic_string\fP (_InputIterator __begin, _InputIterator __end, const _Allocator &__a=_Allocator())" .br .ti -1c .RI "\fBbasic_string\fP (\fBbasic_string\fP &&)=default" .br .ti -1c .RI "\fBbasic_string\fP (\fBbasic_string\fP &&__s, const _Allocator &__a) noexcept(\fBstd::is_nothrow_constructible\fP< \fB_Base\fP, \fB_Base\fP, const _Allocator & >::value)" .br .ti -1c .RI "\fBbasic_string\fP (const _Allocator &__a) noexcept" .br .ti -1c .RI "\fBbasic_string\fP (const \fB_Base\fP &\fB__base\fP)" .br .ti -1c .RI "\fBbasic_string\fP (const _CharT *__s, const _Allocator &__a=_Allocator())" .br .ti -1c .RI "\fBbasic_string\fP (const _CharT *__s, size_type __n, const _Allocator &__a=_Allocator())" .br .ti -1c .RI "\fBbasic_string\fP (const \fBbasic_string\fP &)=default" .br .ti -1c .RI "\fBbasic_string\fP (const \fBbasic_string\fP &__s, const _Allocator &__a)" .br .ti -1c .RI "\fBbasic_string\fP (const \fBbasic_string\fP &__str, size_type __pos, size_type __n=\fB_Base::npos\fP, const _Allocator &__a=_Allocator())" .br .ti -1c .RI "\fBbasic_string\fP (size_type __n, _CharT __c, const _Allocator &__a=_Allocator())" .br .ti -1c .RI "\fBbasic_string\fP (\fBstd::initializer_list\fP< _CharT > __l, const _Allocator &__a=_Allocator())" .br .ti -1c .RI "const \fB_Base\fP & \fB_M_base\fP () const noexcept" .br .ti -1c .RI "\fB_Base\fP & \fB_M_base\fP () noexcept" .br .ti -1c .RI "template \fBbasic_string\fP< _CharT, _Traits, _Alloc > & \fB_M_replace_dispatch\fP (\fBiterator\fP __i1, \fBiterator\fP __i2, _InputIterator __k1, _InputIterator __k2, __false_type)" .br .ti -1c .RI "void \fB_M_swap\fP (\fB_Safe_container\fP &__x) noexcept" .br .ti -1c .RI "template _CharT * \fB_S_construct\fP (_InIterator __beg, _InIterator __end, const _Alloc &__a, forward_iterator_tag)" .br .ti -1c .RI "template \fBbasic_string\fP & \fBappend\fP (_InputIterator __first, _InputIterator __last)" .br .ti -1c .RI "\fBbasic_string\fP & \fBappend\fP (const _CharT *__s)" .br .ti -1c .RI "\fBbasic_string\fP & \fBappend\fP (const _CharT *__s, size_type __n)" .br .ti -1c .RI "template \fB_If_sv\fP< _Tp, \fBbasic_string\fP & > \fBappend\fP (const _Tp &__svt)" .br .RI "Append a string_view\&. " .ti -1c .RI "template \fB_If_sv\fP< _Tp, \fBbasic_string\fP & > \fBappend\fP (const _Tp &__svt, size_type __pos, size_type __n=\fBnpos\fP)" .br .RI "Append a range of characters from a string_view\&. " .ti -1c .RI "\fBbasic_string\fP & \fBappend\fP (const \fBbasic_string\fP &__str)" .br .RI "Append a string to this string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBappend\fP (const \fBbasic_string\fP &__str)" .br .ti -1c .RI "\fBbasic_string\fP & \fBappend\fP (const \fBbasic_string\fP &__str, size_type __pos, size_type __n)" .br .ti -1c .RI "\fBbasic_string\fP & \fBappend\fP (const \fBbasic_string\fP &__str, size_type __pos, size_type __n=\fBnpos\fP)" .br .RI "Append a substring\&. " .ti -1c .RI "\fBbasic_string\fP & \fBappend\fP (initializer_list< _CharT > __l)" .br .RI "Append an initializer_list of characters\&. " .ti -1c .RI "\fBbasic_string\fP & \fBappend\fP (size_type __n, _CharT __c)" .br .ti -1c .RI "template \fBbasic_string\fP & \fBassign\fP (_InputIterator __first, _InputIterator __last)" .br .ti -1c .RI "\fBbasic_string\fP & \fBassign\fP (\fBbasic_string\fP &&__str) noexcept(allocator_traits< _Alloc >::is_always_equal::value)" .br .RI "Set value to contents of another string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBassign\fP (\fBbasic_string\fP &&__x) noexcept(noexcept(\fBstd::declval\fP< \fB_Base\fP & >()\&.assign(\fBstd::move\fP(__x))))" .br .ti -1c .RI "\fBbasic_string\fP & \fBassign\fP (const _CharT *__s)" .br .ti -1c .RI "\fBbasic_string\fP & \fBassign\fP (const _CharT *__s, size_type __n)" .br .ti -1c .RI "template \fB_If_sv\fP< _Tp, \fBbasic_string\fP & > \fBassign\fP (const _Tp &__svt)" .br .RI "Set value from a string_view\&. " .ti -1c .RI "template \fB_If_sv\fP< _Tp, \fBbasic_string\fP & > \fBassign\fP (const _Tp &__svt, size_type __pos, size_type __n=\fBnpos\fP)" .br .RI "Set value from a range of characters in a string_view\&. " .ti -1c .RI "\fBbasic_string\fP & \fBassign\fP (const \fBbasic_string\fP &__str)" .br .RI "Set value to contents of another string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBassign\fP (const \fBbasic_string\fP &__str, size_type __pos, size_type __n)" .br .ti -1c .RI "\fBbasic_string\fP & \fBassign\fP (const \fBbasic_string\fP &__str, size_type __pos, size_type __n=\fBnpos\fP)" .br .RI "Set value to a substring of a string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBassign\fP (const \fBbasic_string\fP &__x)" .br .ti -1c .RI "\fBbasic_string\fP & \fBassign\fP (size_type __n, _CharT __c)" .br .ti -1c .RI "\fBbasic_string\fP & \fBassign\fP (\fBstd::initializer_list\fP< _CharT > __l)" .br .ti -1c .RI "reference \fBat\fP (size_type __n)" .br .RI "Provides access to the data contained in the string\&. " .ti -1c .RI "const_reference \fBat\fP (size_type __n) const" .br .RI "Provides access to the data contained in the string\&. " .ti -1c .RI "reference \fBback\fP ()" .br .ti -1c .RI "const_reference \fBback\fP () const noexcept" .br .ti -1c .RI "\fBiterator\fP \fBbegin\fP ()" .br .ti -1c .RI "\fBconst_iterator\fP \fBbegin\fP () const noexcept" .br .ti -1c .RI "const _CharT * \fBc_str\fP () const noexcept" .br .ti -1c .RI "size_type \fBcapacity\fP () const noexcept" .br .ti -1c .RI "\fBconst_iterator\fP \fBcbegin\fP () const noexcept" .br .ti -1c .RI "\fBconst_iterator\fP \fBcend\fP () const noexcept" .br .ti -1c .RI "void \fBclear\fP ()" .br .ti -1c .RI "int \fBcompare\fP (const _CharT *__s) const" .br .ti -1c .RI "template \fB_If_sv\fP< _Tp, int > \fBcompare\fP (const _Tp &__svt) const noexcept(is_same< _Tp, \fB__sv_type\fP >::value)" .br .RI "Compare to a string_view\&. " .ti -1c .RI "int \fBcompare\fP (const \fBbasic_string\fP &__str) const" .br .RI "Compare to a string\&. " .ti -1c .RI "int \fBcompare\fP (const \fBbasic_string\fP &__str) const" .br .ti -1c .RI "template \fB_If_sv\fP< _Tp, int > \fBcompare\fP (size_type __pos, size_type __n, const _Tp &__svt) const noexcept(is_same< _Tp, \fB__sv_type\fP >::value)" .br .RI "Compare to a string_view\&. " .ti -1c .RI "int \fBcompare\fP (size_type __pos, size_type __n, const \fBbasic_string\fP &__str) const" .br .RI "Compare substring to a string\&. " .ti -1c .RI "int \fBcompare\fP (size_type __pos1, size_type __n1, const _CharT *__s) const" .br .ti -1c .RI "int \fBcompare\fP (size_type __pos1, size_type __n1, const _CharT *__s, size_type __n2) const" .br .ti -1c .RI "template \fB_If_sv\fP< _Tp, int > \fBcompare\fP (size_type __pos1, size_type __n1, const _Tp &__svt, size_type __pos2, size_type __n2=\fBnpos\fP) const noexcept(is_same< _Tp, \fB__sv_type\fP >::value)" .br .RI "Compare to a string_view\&. " .ti -1c .RI "int \fBcompare\fP (size_type __pos1, size_type __n1, const \fBbasic_string\fP &__str) const" .br .ti -1c .RI "int \fBcompare\fP (size_type __pos1, size_type __n1, const \fBbasic_string\fP &__str, size_type __pos2, size_type __n2) const" .br .ti -1c .RI "int \fBcompare\fP (size_type __pos1, size_type __n1, const \fBbasic_string\fP &__str, size_type __pos2, size_type __n2=\fBnpos\fP) const" .br .RI "Compare substring to a substring\&. " .ti -1c .RI "size_type \fBcopy\fP (_CharT *__s, size_type __n, size_type __pos=0) const" .br .ti -1c .RI "\fBconst_reverse_iterator\fP \fBcrbegin\fP () const noexcept" .br .ti -1c .RI "\fBconst_reverse_iterator\fP \fBcrend\fP () const noexcept" .br .ti -1c .RI "const _CharT * \fBdata\fP () const noexcept" .br .ti -1c .RI "_CharT * \fBdata\fP () noexcept" .br .RI "Return non-const pointer to contents\&. " .ti -1c .RI "bool \fBempty\fP () const noexcept" .br .ti -1c .RI "\fBiterator\fP \fBend\fP ()" .br .ti -1c .RI "\fBconst_iterator\fP \fBend\fP () const noexcept" .br .ti -1c .RI "\fBiterator\fP \fBerase\fP (\fB__const_iterator\fP __first, \fB__const_iterator\fP __last)" .br .ti -1c .RI "\fBiterator\fP \fBerase\fP (\fB__const_iterator\fP __position)" .br .ti -1c .RI "\fBiterator\fP \fBerase\fP (\fBiterator\fP __first, \fBiterator\fP __last)" .br .RI "Remove a range of characters\&. " .ti -1c .RI "\fBiterator\fP \fBerase\fP (\fBiterator\fP __position)" .br .RI "Remove one character\&. " .ti -1c .RI "\fBbasic_string\fP & \fBerase\fP (size_type __pos=0, size_type __n=\fB_Base::npos\fP)" .br .ti -1c .RI "size_type \fBfind\fP (_CharT __c, size_type __pos=0) const noexcept" .br .ti -1c .RI "size_type \fBfind\fP (const _CharT *__s, size_type __pos, size_type __n) const" .br .ti -1c .RI "size_type \fBfind\fP (const _CharT *__s, size_type __pos=0) const" .br .ti -1c .RI "template \fB_If_sv\fP< _Tp, size_type > \fBfind\fP (const _Tp &__svt, size_type __pos=0) const noexcept(is_same< _Tp, \fB__sv_type\fP >::value)" .br .RI "Find position of a string_view\&. " .ti -1c .RI "size_type \fBfind\fP (const \fBbasic_string\fP &__str, size_type __pos=0) const noexcept" .br .RI "Find position of a string\&. " .ti -1c .RI "size_type \fBfind\fP (const \fBbasic_string\fP &__str, size_type __pos=0) const noexcept" .br .ti -1c .RI "size_type \fBfind_first_not_of\fP (_CharT __c, size_type __pos=0) const noexcept" .br .ti -1c .RI "size_type \fBfind_first_not_of\fP (const _CharT *__s, size_type __pos, size_type __n) const" .br .ti -1c .RI "size_type \fBfind_first_not_of\fP (const _CharT *__s, size_type __pos=0) const" .br .ti -1c .RI "template \fB_If_sv\fP< _Tp, size_type > \fBfind_first_not_of\fP (const _Tp &__svt, size_type __pos=0) const noexcept(is_same< _Tp, \fB__sv_type\fP >::value)" .br .RI "Find position of a character not in a string_view\&. " .ti -1c .RI "size_type \fBfind_first_not_of\fP (const \fBbasic_string\fP &__str, size_type __pos=0) const noexcept" .br .RI "Find position of a character not in string\&. " .ti -1c .RI "size_type \fBfind_first_not_of\fP (const \fBbasic_string\fP &__str, size_type __pos=0) const noexcept" .br .ti -1c .RI "size_type \fBfind_first_of\fP (_CharT __c, size_type __pos=0) const noexcept" .br .ti -1c .RI "size_type \fBfind_first_of\fP (const _CharT *__s, size_type __pos, size_type __n) const" .br .ti -1c .RI "size_type \fBfind_first_of\fP (const _CharT *__s, size_type __pos=0) const" .br .ti -1c .RI "template \fB_If_sv\fP< _Tp, size_type > \fBfind_first_of\fP (const _Tp &__svt, size_type __pos=0) const noexcept(is_same< _Tp, \fB__sv_type\fP >::value)" .br .RI "Find position of a character of a string_view\&. " .ti -1c .RI "size_type \fBfind_first_of\fP (const \fBbasic_string\fP &__str, size_type __pos=0) const noexcept" .br .RI "Find position of a character of string\&. " .ti -1c .RI "size_type \fBfind_first_of\fP (const \fBbasic_string\fP &__str, size_type __pos=0) const noexcept" .br .ti -1c .RI "size_type \fBfind_last_not_of\fP (_CharT __c, size_type __pos=\fB_Base::npos\fP) const noexcept" .br .ti -1c .RI "size_type \fBfind_last_not_of\fP (const _CharT *__s, size_type __pos, size_type __n) const" .br .ti -1c .RI "size_type \fBfind_last_not_of\fP (const _CharT *__s, size_type __pos=\fB_Base::npos\fP) const" .br .ti -1c .RI "template \fB_If_sv\fP< _Tp, size_type > \fBfind_last_not_of\fP (const _Tp &__svt, size_type __pos=\fBnpos\fP) const noexcept(is_same< _Tp, \fB__sv_type\fP >::value)" .br .RI "Find last position of a character not in a string_view\&. " .ti -1c .RI "size_type \fBfind_last_not_of\fP (const \fBbasic_string\fP &__str, size_type __pos=\fB_Base::npos\fP) const noexcept" .br .ti -1c .RI "size_type \fBfind_last_not_of\fP (const \fBbasic_string\fP &__str, size_type __pos=\fBnpos\fP) const noexcept" .br .RI "Find last position of a character not in string\&. " .ti -1c .RI "size_type \fBfind_last_of\fP (_CharT __c, size_type __pos=\fB_Base::npos\fP) const noexcept" .br .ti -1c .RI "size_type \fBfind_last_of\fP (const _CharT *__s, size_type __pos, size_type __n) const" .br .ti -1c .RI "size_type \fBfind_last_of\fP (const _CharT *__s, size_type __pos=\fB_Base::npos\fP) const" .br .ti -1c .RI "template \fB_If_sv\fP< _Tp, size_type > \fBfind_last_of\fP (const _Tp &__svt, size_type __pos=\fBnpos\fP) const noexcept(is_same< _Tp, \fB__sv_type\fP >::value)" .br .RI "Find last position of a character of string\&. " .ti -1c .RI "size_type \fBfind_last_of\fP (const \fBbasic_string\fP &__str, size_type __pos=\fB_Base::npos\fP) const noexcept" .br .ti -1c .RI "size_type \fBfind_last_of\fP (const \fBbasic_string\fP &__str, size_type __pos=\fBnpos\fP) const noexcept" .br .RI "Find last position of a character of string\&. " .ti -1c .RI "reference \fBfront\fP ()" .br .ti -1c .RI "const_reference \fBfront\fP () const noexcept" .br .ti -1c .RI "allocator_type \fBget_allocator\fP () const noexcept" .br .RI "Return copy of allocator used to construct this string\&. " .ti -1c .RI "\fBiterator\fP \fBinsert\fP (\fB__const_iterator\fP __p, _CharT __c)" .br .ti -1c .RI "template \fBiterator\fP \fBinsert\fP (\fB__const_iterator\fP __p, _InputIterator __first, _InputIterator __last)" .br .ti -1c .RI "\fBiterator\fP \fBinsert\fP (\fBconst_iterator\fP __p, size_type __n, _CharT __c)" .br .ti -1c .RI "\fBiterator\fP \fBinsert\fP (\fBconst_iterator\fP __p, \fBstd::initializer_list\fP< _CharT > __l)" .br .ti -1c .RI "\fBiterator\fP \fBinsert\fP (\fBiterator\fP __p, _CharT __c)" .br .RI "Insert one character\&. " .ti -1c .RI "template void \fBinsert\fP (\fBiterator\fP __p, _InputIterator __beg, _InputIterator __end)" .br .RI "Insert a range of characters\&. " .ti -1c .RI "void \fBinsert\fP (\fBiterator\fP __p, initializer_list< _CharT > __l)" .br .RI "Insert an initializer_list of characters\&. " .ti -1c .RI "void \fBinsert\fP (\fBiterator\fP __p, size_type __n, _CharT __c)" .br .RI "Insert multiple characters\&. " .ti -1c .RI "\fBbasic_string\fP & \fBinsert\fP (size_type __pos, const _CharT *__s)" .br .ti -1c .RI "\fBbasic_string\fP & \fBinsert\fP (size_type __pos, const _CharT *__s, size_type __n)" .br .ti -1c .RI "template \fB_If_sv\fP< _Tp, \fBbasic_string\fP & > \fBinsert\fP (size_type __pos, const _Tp &__svt)" .br .RI "Insert a string_view\&. " .ti -1c .RI "\fBbasic_string\fP & \fBinsert\fP (size_type __pos, size_type __n, _CharT __c)" .br .ti -1c .RI "template \fB_If_sv\fP< _Tp, \fBbasic_string\fP & > \fBinsert\fP (size_type __pos1, const _Tp &__svt, size_type __pos2, size_type __n=\fBnpos\fP)" .br .RI "Insert a string_view\&. " .ti -1c .RI "\fBbasic_string\fP & \fBinsert\fP (size_type __pos1, const \fBbasic_string\fP &__str)" .br .RI "Insert value of a string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBinsert\fP (size_type __pos1, const \fBbasic_string\fP &__str)" .br .ti -1c .RI "\fBbasic_string\fP & \fBinsert\fP (size_type __pos1, const \fBbasic_string\fP &__str, size_type __pos2, size_type __n)" .br .ti -1c .RI "\fBbasic_string\fP & \fBinsert\fP (size_type __pos1, const \fBbasic_string\fP &__str, size_type __pos2, size_type __n=\fBnpos\fP)" .br .RI "Insert a substring\&. " .ti -1c .RI "size_type \fBlength\fP () const noexcept" .br .RI "Returns the number of characters in the string, not including any null-termination\&. " .ti -1c .RI "size_type \fBmax_size\fP () const noexcept" .br .RI "Returns the size() of the largest possible string\&. " .ti -1c .RI "\fBoperator __sv_type\fP () const noexcept" .br .RI "Convert to a string_view\&. " .ti -1c .RI "\fBbasic_string\fP & \fBoperator+=\fP (_CharT __c)" .br .ti -1c .RI "\fBbasic_string\fP & \fBoperator+=\fP (const _CharT *__s)" .br .ti -1c .RI "template \fB_If_sv\fP< _Tp, \fBbasic_string\fP & > \fBoperator+=\fP (const _Tp &__svt)" .br .RI "Append a string_view\&. " .ti -1c .RI "\fBbasic_string\fP & \fBoperator+=\fP (const \fBbasic_string\fP &__str)" .br .RI "Append a string to this string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBoperator+=\fP (const \fBbasic_string\fP &__str)" .br .ti -1c .RI "\fBbasic_string\fP & \fBoperator+=\fP (\fBstd::initializer_list\fP< _CharT > __l)" .br .ti -1c .RI "\fBbasic_string\fP & \fBoperator=\fP (_CharT __c)" .br .ti -1c .RI "\fBbasic_string\fP & \fBoperator=\fP (\fBbasic_string\fP &&)=default" .br .ti -1c .RI "\fBbasic_string\fP & \fBoperator=\fP (const _CharT *__s)" .br .ti -1c .RI "\fBbasic_string\fP & \fBoperator=\fP (const \fBbasic_string\fP &)=default" .br .ti -1c .RI "\fBbasic_string\fP & \fBoperator=\fP (\fBstd::initializer_list\fP< _CharT > __l)" .br .ti -1c .RI "reference \fBoperator[]\fP (size_type __pos)" .br .ti -1c .RI "const_reference \fBoperator[]\fP (size_type __pos) const noexcept" .br .ti -1c .RI "void \fBpop_back\fP ()" .br .ti -1c .RI "void \fBpush_back\fP (_CharT __c)" .br .ti -1c .RI "\fBreverse_iterator\fP \fBrbegin\fP ()" .br .ti -1c .RI "\fBconst_reverse_iterator\fP \fBrbegin\fP () const noexcept" .br .ti -1c .RI "\fBreverse_iterator\fP \fBrend\fP ()" .br .ti -1c .RI "\fBconst_reverse_iterator\fP \fBrend\fP () const noexcept" .br .ti -1c .RI "template \fBbasic_string\fP & \fBreplace\fP (\fB__const_iterator\fP __i1, \fB__const_iterator\fP __i2, _InputIterator __j1, _InputIterator __j2)" .br .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (\fB__const_iterator\fP __i1, \fB__const_iterator\fP __i2, const _CharT *__s)" .br .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (\fB__const_iterator\fP __i1, \fB__const_iterator\fP __i2, const _CharT *__s, size_type __n)" .br .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (\fB__const_iterator\fP __i1, \fB__const_iterator\fP __i2, const \fBbasic_string\fP &__str)" .br .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (\fB__const_iterator\fP __i1, \fB__const_iterator\fP __i2, size_type __n, _CharT __c)" .br .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (\fB__const_iterator\fP __i1, \fB__const_iterator\fP __i2, \fBstd::initializer_list\fP< _CharT > __l)" .br .ti -1c .RI "template \fB_If_sv\fP< _Tp, \fBbasic_string\fP & > \fBreplace\fP (\fBconst_iterator\fP __i1, \fBconst_iterator\fP __i2, const _Tp &__svt)" .br .RI "Replace range of characters with string_view\&. " .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (\fBiterator\fP __i1, \fBiterator\fP __i2, _CharT *__k1, _CharT *__k2)" .br .ti -1c .RI "template \fBbasic_string\fP & \fBreplace\fP (\fBiterator\fP __i1, \fBiterator\fP __i2, _InputIterator __k1, _InputIterator __k2)" .br .RI "Replace range of characters with range\&. " .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (\fBiterator\fP __i1, \fBiterator\fP __i2, const _CharT *__k1, const _CharT *__k2)" .br .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (\fBiterator\fP __i1, \fBiterator\fP __i2, const _CharT *__s)" .br .RI "Replace range of characters with C string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (\fBiterator\fP __i1, \fBiterator\fP __i2, const _CharT *__s, size_type __n)" .br .RI "Replace range of characters with C substring\&. " .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (\fBiterator\fP __i1, \fBiterator\fP __i2, const \fBbasic_string\fP &__str)" .br .RI "Replace range of characters with string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (\fBiterator\fP __i1, \fBiterator\fP __i2, \fBconst_iterator\fP __k1, \fBconst_iterator\fP __k2)" .br .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (\fBiterator\fP __i1, \fBiterator\fP __i2, initializer_list< _CharT > __l)" .br .RI "Replace range of characters with initializer_list\&. " .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (\fBiterator\fP __i1, \fBiterator\fP __i2, \fBiterator\fP __k1, \fBiterator\fP __k2)" .br .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (\fBiterator\fP __i1, \fBiterator\fP __i2, size_type __n, _CharT __c)" .br .RI "Replace range of characters with multiple characters\&. " .ti -1c .RI "template \fB_If_sv\fP< _Tp, \fBbasic_string\fP & > \fBreplace\fP (size_type __pos, size_type __n, const _Tp &__svt)" .br .RI "Replace range of characters with string_view\&. " .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (size_type __pos, size_type __n, const \fBbasic_string\fP &__str)" .br .RI "Replace characters with value from another string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (size_type __pos, size_type __n1, const _CharT *__s)" .br .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (size_type __pos, size_type __n1, const _CharT *__s, size_type __n2)" .br .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (size_type __pos, size_type __n1, size_type __n2, _CharT __c)" .br .ti -1c .RI "template \fB_If_sv\fP< _Tp, \fBbasic_string\fP & > \fBreplace\fP (size_type __pos1, size_type __n1, const _Tp &__svt, size_type __pos2, size_type __n2=\fBnpos\fP)" .br .RI "Replace range of characters with string_view\&. " .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (size_type __pos1, size_type __n1, const \fBbasic_string\fP &__str)" .br .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (size_type __pos1, size_type __n1, const \fBbasic_string\fP &__str, size_type __pos2, size_type __n2)" .br .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (size_type __pos1, size_type __n1, const \fBbasic_string\fP &__str, size_type __pos2, size_type __n2=\fBnpos\fP)" .br .RI "Replace characters with value from another string\&. " .ti -1c .RI "void \fBreserve\fP ()" .br .RI "Equivalent to shrink_to_fit()\&. " .ti -1c .RI "void \fBreserve\fP (size_type __res_arg)" .br .RI "Attempt to preallocate enough memory for specified number of characters\&. " .ti -1c .RI "void \fBresize\fP (size_type __n)" .br .ti -1c .RI "void \fBresize\fP (size_type __n, _CharT __c)" .br .ti -1c .RI "size_type \fBrfind\fP (_CharT __c, size_type __pos=\fB_Base::npos\fP) const noexcept" .br .ti -1c .RI "size_type \fBrfind\fP (const _CharT *__s, size_type __pos, size_type __n) const" .br .ti -1c .RI "size_type \fBrfind\fP (const _CharT *__s, size_type __pos=\fB_Base::npos\fP) const" .br .ti -1c .RI "template \fB_If_sv\fP< _Tp, size_type > \fBrfind\fP (const _Tp &__svt, size_type __pos=\fBnpos\fP) const noexcept(is_same< _Tp, \fB__sv_type\fP >::value)" .br .RI "Find last position of a string_view\&. " .ti -1c .RI "size_type \fBrfind\fP (const \fBbasic_string\fP &__str, size_type __pos=\fB_Base::npos\fP) const noexcept" .br .ti -1c .RI "size_type \fBrfind\fP (const \fBbasic_string\fP &__str, size_type __pos=\fBnpos\fP) const noexcept" .br .RI "Find last position of a string\&. " .ti -1c .RI "void \fBshrink_to_fit\fP () noexcept" .br .ti -1c .RI "size_type \fBsize\fP () const noexcept" .br .RI "Returns the number of characters in the string, not including any null-termination\&. " .ti -1c .RI "\fBbasic_string\fP \fBsubstr\fP (size_type __pos=0, size_type __n=\fB_Base::npos\fP) const" .br .ti -1c .RI "void \fBswap\fP (\fBbasic_string\fP &__s) noexcept(/*conditional */)" .br .RI "Swap contents with another string\&. " .ti -1c .RI "void \fBswap\fP (\fBbasic_string\fP &__x) noexcept(/*conditional */)" .br .in -1c .SS "Static Public Attributes" .in +1c .ti -1c .RI "static const size_type \fBnpos\fP" .br .RI "Value returned by various member functions when they fail\&. " .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "\fB_Safe_container\fP & \fB_M_safe\fP () noexcept" .br .in -1c .SS "Friends" .in +1c .ti -1c .RI "template class \fB::__gnu_debug::_Safe_iterator\fP" .br .in -1c .SH "Detailed Description" .PP .SS "template, typename _Allocator = std::allocator<_CharT>> .br class __gnu_debug::basic_string< _CharT, _Traits, _Allocator >"Class std::basic_string with safety/checking/debug instrumentation\&. .SH "Member Function Documentation" .PP .SS "template template \fB_If_sv\fP< _Tp, \fBbasic_string\fP & > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::append (\fBconst\fP _Tp & __svt)\fC [inline]\fP, \fC [inherited]\fP" .PP Append a string_view\&. .PP \fBParameters\fP .RS 4 \fI__svt\fP The object convertible to string_view to be appended\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::append()\fP\&. .SS "template template \fB_If_sv\fP< _Tp, \fBbasic_string\fP & > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::append (\fBconst\fP _Tp & __svt, size_type __pos, size_type __n = \fC\fBnpos\fP\fP)\fC [inline]\fP, \fC [inherited]\fP" .PP Append a range of characters from a string_view\&. .PP \fBParameters\fP .RS 4 \fI__svt\fP The object convertible to string_view to be appended from\&. .br \fI__pos\fP The position in the string_view to append from\&. .br \fI__n\fP The number of characters to append from the string_view\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::append()\fP\&. .SS "template \fBbasic_string\fP< _CharT, _Traits, _Alloc > & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::append (\fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str)\fC [inherited]\fP" .PP Append a string to this string\&. .PP \fBParameters\fP .RS 4 \fI__str\fP The string to append\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP .PP References \fBstd::size()\fP\&. .PP Referenced by \fBstd::basic_string< _CharT, _Traits, _Alloc >::append()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::append()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::append()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::append()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::operator+=()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::operator+=()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::operator+=()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::operator+=()\fP\&. .SS "template \fBbasic_string\fP< _CharT, _Traits, _Alloc > & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::append (\fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str, size_type __pos, size_type __n = \fC\fBnpos\fP\fP)\fC [inherited]\fP" .PP Append a substring\&. .PP \fBParameters\fP .RS 4 \fI__str\fP The string to append\&. .br \fI__pos\fP Index of the first character of str to append\&. .br \fI__n\fP The number of characters to append\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::out_of_range\fP if \fI__pos\fP is not a valid index\&. .RE .PP This function appends \fI__n\fP characters from \fI__str\fP starting at \fI__pos\fP to this string\&. If \fI__n\fP is is larger than the number of available characters in \fI__str\fP, the remainder of \fI__str\fP is appended\&. .PP References \fBstd::size()\fP\&. .SS "template \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::append (\fBinitializer_list\fP< _CharT > __l)\fC [inline]\fP, \fC [inherited]\fP" .PP Append an initializer_list of characters\&. .PP \fBParameters\fP .RS 4 \fI__l\fP The initializer_list of characters to append\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::append()\fP\&. .SS "template \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::assign (\fBbasic_string\fP< _CharT, _Traits, _Alloc > && __str)\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" .PP Set value to contents of another string\&. .PP \fBParameters\fP .RS 4 \fI__str\fP Source string to use\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP This function sets this string to the exact contents of \fI__str\fP\&. \fI__str\fP is a valid, but unspecified string\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::swap()\fP\&. .SS "template template \fB_If_sv\fP< _Tp, \fBbasic_string\fP & > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::assign (\fBconst\fP _Tp & __svt)\fC [inline]\fP, \fC [inherited]\fP" .PP Set value from a string_view\&. .PP \fBParameters\fP .RS 4 \fI__svt\fP The source object convertible to string_view\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::assign()\fP\&. .SS "template template \fB_If_sv\fP< _Tp, \fBbasic_string\fP & > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::assign (\fBconst\fP _Tp & __svt, size_type __pos, size_type __n = \fC\fBnpos\fP\fP)\fC [inline]\fP, \fC [inherited]\fP" .PP Set value from a range of characters in a string_view\&. .PP \fBParameters\fP .RS 4 \fI__svt\fP The source object convertible to string_view\&. .br \fI__pos\fP The position in the string_view to assign from\&. .br \fI__n\fP The number of characters to assign\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::assign()\fP\&. .SS "template \fBbasic_string\fP< _CharT, _Traits, _Alloc > & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::assign (\fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str)\fC [inherited]\fP" .PP Set value to contents of another string\&. .PP \fBParameters\fP .RS 4 \fI__str\fP Source string to use\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP .PP Referenced by \fBstd::basic_string< _CharT, _Traits, _Alloc >::assign()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::assign()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::assign()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::assign()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::assign()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::operator=()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::operator=()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::operator=()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::operator=()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::operator=()\fP\&. .SS "template \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::assign (\fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str, size_type __pos, size_type __n = \fC\fBnpos\fP\fP)\fC [inline]\fP, \fC [inherited]\fP" .PP Set value to a substring of a string\&. .PP \fBParameters\fP .RS 4 \fI__str\fP The string to use\&. .br \fI__pos\fP Index of the first character of str\&. .br \fI__n\fP Number of characters to use\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::out_of_range\fP if \fIpos\fP is not a valid index\&. .RE .PP This function sets this string to the substring of \fI__str\fP consisting of \fI__n\fP characters at \fI__pos\fP\&. If \fI__n\fP is is larger than the number of available characters in \fI__str\fP, the remainder of \fI__str\fP is used\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::assign()\fP\&. .SS "template, typename _Allocator = std::allocator<_CharT>> reference \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::at (size_type __n)\fC [inline]\fP" .PP Provides access to the data contained in the string\&. .PP \fBParameters\fP .RS 4 \fI__n\fP The index of the character to access\&. .RE .PP \fBReturns\fP .RS 4 Read/write reference to the character\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::out_of_range\fP If \fIn\fP is an invalid index\&. .RE .PP This function provides for safer data access\&. The parameter is first checked that it is in the range of the string\&. The function throws out_of_range if the check fails\&. Success results in unsharing the string\&. .SS "template, typename _Allocator = std::allocator<_CharT>> const_reference \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::at (size_type __n) const\fC [inline]\fP" .PP Provides access to the data contained in the string\&. .PP \fBParameters\fP .RS 4 \fI__n\fP The index of the character to access\&. .RE .PP \fBReturns\fP .RS 4 Read-only (const) reference to the character\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::out_of_range\fP If \fIn\fP is an invalid index\&. .RE .PP This function provides for safer data access\&. The parameter is first checked that it is in the range of the string\&. The function throws out_of_range if the check fails\&. .SS "template, typename _Allocator = std::allocator<_CharT>> reference \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::back ()\fC [inline]\fP" Returns a read/write reference to the data at the last element of the string\&. .SS "template, typename _Allocator = std::allocator<_CharT>> const_reference \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::back () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) reference to the data at the last element of the string\&. .SS "template, typename _Allocator = std::allocator<_CharT>> size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::capacity () const\fC [inline]\fP, \fC [noexcept]\fP" Returns the total number of characters that the string can hold before needing to allocate more memory\&. .SS "template template \fB_If_sv\fP< _Tp, int > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::compare (\fBconst\fP _Tp & __svt) const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" .PP Compare to a string_view\&. .PP \fBParameters\fP .RS 4 \fI__svt\fP An object convertible to string_view to compare against\&. .RE .PP \fBReturns\fP .RS 4 Integer < 0, 0, or > 0\&. .RE .PP .PP References \fBstd::min()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::size()\fP\&. .SS "template int \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::compare (\fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str) const\fC [inline]\fP, \fC [inherited]\fP" .PP Compare to a string\&. .PP \fBParameters\fP .RS 4 \fI__str\fP String to compare against\&. .RE .PP \fBReturns\fP .RS 4 Integer < 0, 0, or > 0\&. .RE .PP Returns an integer < 0 if this string is ordered before \fI__str\fP, 0 if their values are equivalent, or > 0 if this string is ordered after \fI__str\fP\&. Determines the effective length rlen of the strings to compare as the smallest of size() and str\&.size()\&. The function then compares the two strings by calling traits::compare(data(), str\&.data(),rlen)\&. If the result of the comparison is nonzero returns it, otherwise the shorter one is ordered first\&. .PP References \fBstd::min()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::size()\fP\&. .SS "template template \fB_If_sv\fP< _Tp, int > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::compare (size_type __pos, size_type __n, \fBconst\fP _Tp & __svt) const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" .PP Compare to a string_view\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP A position in the string to start comparing from\&. .br \fI__n\fP The number of characters to compare\&. .br \fI__svt\fP An object convertible to string_view to compare against\&. .RE .PP \fBReturns\fP .RS 4 Integer < 0, 0, or > 0\&. .RE .PP .SS "template int \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::compare (size_type __pos, size_type __n, \fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str) const\fC [inherited]\fP" .PP Compare substring to a string\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP Index of first character of substring\&. .br \fI__n\fP Number of characters in substring\&. .br \fI__str\fP String to compare against\&. .RE .PP \fBReturns\fP .RS 4 Integer < 0, 0, or > 0\&. .RE .PP Form the substring of this string from the \fI__n\fP characters starting at \fI__pos\fP\&. Returns an integer < 0 if the substring is ordered before \fI__str\fP, 0 if their values are equivalent, or > 0 if the substring is ordered after \fI__str\fP\&. Determines the effective length rlen of the strings to compare as the smallest of the length of the substring and \fI__str\&.size()\fP\&. The function then compares the two strings by calling traits::compare(substring\&.data(),str\&.data(),rlen)\&. If the result of the comparison is nonzero returns it, otherwise the shorter one is ordered first\&. .PP References \fBstd::min()\fP\&. .SS "template template \fB_If_sv\fP< _Tp, int > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::compare (size_type __pos1, size_type __n1, \fBconst\fP _Tp & __svt, size_type __pos2, size_type __n2 = \fC\fBnpos\fP\fP) const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" .PP Compare to a string_view\&. .PP \fBParameters\fP .RS 4 \fI__pos1\fP A position in the string to start comparing from\&. .br \fI__n1\fP The number of characters to compare\&. .br \fI__svt\fP An object convertible to string_view to compare against\&. .br \fI__pos2\fP A position in the string_view to start comparing from\&. .br \fI__n2\fP The number of characters to compare\&. .RE .PP \fBReturns\fP .RS 4 Integer < 0, 0, or > 0\&. .RE .PP .SS "template int \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::compare (size_type __pos1, size_type __n1, \fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str, size_type __pos2, size_type __n2 = \fC\fBnpos\fP\fP) const\fC [inherited]\fP" .PP Compare substring to a substring\&. .PP \fBParameters\fP .RS 4 \fI__pos1\fP Index of first character of substring\&. .br \fI__n1\fP Number of characters in substring\&. .br \fI__str\fP String to compare against\&. .br \fI__pos2\fP Index of first character of substring of str\&. .br \fI__n2\fP Number of characters in substring of str\&. .RE .PP \fBReturns\fP .RS 4 Integer < 0, 0, or > 0\&. .RE .PP Form the substring of this string from the \fI__n1\fP characters starting at \fI__pos1\fP\&. Form the substring of \fI__str\fP from the \fI__n2\fP characters starting at \fI__pos2\fP\&. Returns an integer < 0 if this substring is ordered before the substring of \fI__str\fP, 0 if their values are equivalent, or > 0 if this substring is ordered after the substring of \fI__str\fP\&. Determines the effective length rlen of the strings to compare as the smallest of the lengths of the substrings\&. The function then compares the two strings by calling traits::compare(substring\&.data(),str\&.substr(pos2,n2)\&.data(),rlen)\&. If the result of the comparison is nonzero returns it, otherwise the shorter one is ordered first\&. .PP References \fBstd::min()\fP\&. .SS "template _CharT * \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::data ()\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" .PP Return non-const pointer to contents\&. This is a pointer to the character sequence held by the string\&. Modifying the characters in the sequence is allowed\&. .SS "template, typename _Allocator = std::allocator<_CharT>> bool \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::empty () const\fC [inline]\fP, \fC [noexcept]\fP" Returns true if the string is empty\&. Equivalent to \fC*this == ''\fP\&. .SS "template \fBbasic_string\fP< _CharT, _Traits, _Alloc >::iterator \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::erase (iterator __first, iterator __last)\fC [inherited]\fP" .PP Remove a range of characters\&. .PP \fBParameters\fP .RS 4 \fI__first\fP Iterator referencing the first character to remove\&. .br \fI__last\fP Iterator referencing the end of the range\&. .RE .PP \fBReturns\fP .RS 4 Iterator referencing location of first after removal\&. .RE .PP Removes the characters in the range [first,last) from this string\&. The value of the string doesn't change if an error is thrown\&. .SS "template \fBiterator\fP \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::erase (iterator __position)\fC [inline]\fP, \fC [inherited]\fP" .PP Remove one character\&. .PP \fBParameters\fP .RS 4 \fI__position\fP Iterator referencing the character to remove\&. .RE .PP \fBReturns\fP .RS 4 iterator referencing same location after removal\&. .RE .PP Removes the character at \fI__position\fP from this string\&. The value of the string doesn't change if an error is thrown\&. .SS "template template \fB_If_sv\fP< _Tp, size_type > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find (\fBconst\fP _Tp & __svt, size_type __pos = \fC0\fP) const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" .PP Find position of a string_view\&. .PP \fBParameters\fP .RS 4 \fI__svt\fP The object convertible to string_view to locate\&. .br \fI__pos\fP Index of character to search from (default 0)\&. .RE .PP \fBReturns\fP .RS 4 Index of start of first occurrence\&. .RE .PP .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::find()\fP\&. .SS "template size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find (\fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str, size_type __pos = \fC0\fP) const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" .PP Find position of a string\&. .PP \fBParameters\fP .RS 4 \fI__str\fP String to locate\&. .br \fI__pos\fP Index of character to search from (default 0)\&. .RE .PP \fBReturns\fP .RS 4 Index of start of first occurrence\&. .RE .PP Starting from \fI__pos\fP, searches forward for value of \fI__str\fP within this string\&. If found, returns the index where it begins\&. If not found, returns npos\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::find()\fP\&. .SS "template template \fB_If_sv\fP< _Tp, size_type > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find_first_not_of (\fBconst\fP _Tp & __svt, size_type __pos = \fC0\fP) const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" .PP Find position of a character not in a string_view\&. .PP \fBParameters\fP .RS 4 \fI__svt\fP An object convertible to string_view containing characters to avoid\&. .br \fI__pos\fP Index of character to search from (default 0)\&. .RE .PP \fBReturns\fP .RS 4 Index of first occurrence\&. .RE .PP .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_first_not_of()\fP\&. .SS "template size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find_first_not_of (\fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str, size_type __pos = \fC0\fP) const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" .PP Find position of a character not in string\&. .PP \fBParameters\fP .RS 4 \fI__str\fP String containing characters to avoid\&. .br \fI__pos\fP Index of character to search from (default 0)\&. .RE .PP \fBReturns\fP .RS 4 Index of first occurrence\&. .RE .PP Starting from \fI__pos\fP, searches forward for a character not contained in \fI__str\fP within this string\&. If found, returns the index where it was found\&. If not found, returns npos\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_first_not_of()\fP\&. .PP Referenced by \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_first_not_of()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_first_not_of()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_first_not_of()\fP\&. .SS "template template \fB_If_sv\fP< _Tp, size_type > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find_first_of (\fBconst\fP _Tp & __svt, size_type __pos = \fC0\fP) const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" .PP Find position of a character of a string_view\&. .PP \fBParameters\fP .RS 4 \fI__svt\fP An object convertible to string_view containing characters to locate\&. .br \fI__pos\fP Index of character to search from (default 0)\&. .RE .PP \fBReturns\fP .RS 4 Index of first occurrence\&. .RE .PP .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_first_of()\fP\&. .SS "template size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find_first_of (\fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str, size_type __pos = \fC0\fP) const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" .PP Find position of a character of string\&. .PP \fBParameters\fP .RS 4 \fI__str\fP String containing characters to locate\&. .br \fI__pos\fP Index of character to search from (default 0)\&. .RE .PP \fBReturns\fP .RS 4 Index of first occurrence\&. .RE .PP Starting from \fI__pos\fP, searches forward for one of the characters of \fI__str\fP within this string\&. If found, returns the index where it was found\&. If not found, returns npos\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_first_of()\fP\&. .PP Referenced by \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_first_of()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_first_of()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_first_of()\fP\&. .SS "template template \fB_If_sv\fP< _Tp, size_type > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find_last_not_of (\fBconst\fP _Tp & __svt, size_type __pos = \fC\fBnpos\fP\fP) const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" .PP Find last position of a character not in a string_view\&. .PP \fBParameters\fP .RS 4 \fI__svt\fP An object convertible to string_view containing characters to avoid\&. .br \fI__pos\fP Index of character to search back from (default end)\&. .RE .PP \fBReturns\fP .RS 4 Index of last occurrence\&. .RE .PP .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_last_not_of()\fP\&. .SS "template size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find_last_not_of (\fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str, size_type __pos = \fC\fBnpos\fP\fP) const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" .PP Find last position of a character not in string\&. .PP \fBParameters\fP .RS 4 \fI__str\fP String containing characters to avoid\&. .br \fI__pos\fP Index of character to search back from (default end)\&. .RE .PP \fBReturns\fP .RS 4 Index of last occurrence\&. .RE .PP Starting from \fI__pos\fP, searches backward for a character not contained in \fI__str\fP within this string\&. If found, returns the index where it was found\&. If not found, returns npos\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_last_not_of()\fP\&. .PP Referenced by \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_last_not_of()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_last_not_of()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_last_not_of()\fP\&. .SS "template template \fB_If_sv\fP< _Tp, size_type > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find_last_of (\fBconst\fP _Tp & __svt, size_type __pos = \fC\fBnpos\fP\fP) const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" .PP Find last position of a character of string\&. .PP \fBParameters\fP .RS 4 \fI__svt\fP An object convertible to string_view containing characters to locate\&. .br \fI__pos\fP Index of character to search back from (default end)\&. .RE .PP \fBReturns\fP .RS 4 Index of last occurrence\&. .RE .PP .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_last_of()\fP\&. .SS "template size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find_last_of (\fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str, size_type __pos = \fC\fBnpos\fP\fP) const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" .PP Find last position of a character of string\&. .PP \fBParameters\fP .RS 4 \fI__str\fP String containing characters to locate\&. .br \fI__pos\fP Index of character to search back from (default end)\&. .RE .PP \fBReturns\fP .RS 4 Index of last occurrence\&. .RE .PP Starting from \fI__pos\fP, searches backward for one of the characters of \fI__str\fP within this string\&. If found, returns the index where it was found\&. If not found, returns npos\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_last_of()\fP\&. .PP Referenced by \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_last_of()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_last_of()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_last_of()\fP\&. .SS "template, typename _Allocator = std::allocator<_CharT>> reference \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::front ()\fC [inline]\fP" Returns a read/write reference to the data at the first element of the string\&. .SS "template, typename _Allocator = std::allocator<_CharT>> const_reference \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::front () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) reference to the data at the first element of the string\&. .SS "template, typename _Allocator = std::allocator<_CharT>> allocator_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::get_allocator () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Return copy of allocator used to construct this string\&. .SS "template \fBiterator\fP \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::insert (iterator __p, _CharT __c)\fC [inline]\fP, \fC [inherited]\fP" .PP Insert one character\&. .PP \fBParameters\fP .RS 4 \fI__p\fP Iterator referencing position in string to insert at\&. .br \fI__c\fP The character to insert\&. .RE .PP \fBReturns\fP .RS 4 Iterator referencing newly inserted char\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::length_error\fP If new length exceeds \fCmax_size()\fP\&. .RE .PP Inserts character \fI__c\fP at position referenced by \fI__p\fP\&. If adding character causes the length to exceed max_size(), length_error is thrown\&. If \fI__p\fP is beyond end of string, out_of_range is thrown\&. The value of the string doesn't change if an error is thrown\&. .SS "template template void \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::insert (iterator __p, \fB_InputIterator\fP __beg, \fB_InputIterator\fP __end)\fC [inline]\fP, \fC [inherited]\fP" .PP Insert a range of characters\&. .PP \fBParameters\fP .RS 4 \fI__p\fP Iterator referencing location in string to insert at\&. .br \fI__beg\fP Start of range\&. .br \fI__end\fP End of range\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::length_error\fP If new length exceeds \fCmax_size()\fP\&. .RE .PP Inserts characters in range [__beg,__end)\&. If adding characters causes the length to exceed max_size(), length_error is thrown\&. The value of the string doesn't change if an error is thrown\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP\&. .SS "template void \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::insert (iterator __p, \fBinitializer_list\fP< _CharT > __l)\fC [inline]\fP, \fC [inherited]\fP" .PP Insert an initializer_list of characters\&. .PP \fBParameters\fP .RS 4 \fI__p\fP Iterator referencing location in string to insert at\&. .br \fI__l\fP The initializer_list of characters to insert\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::length_error\fP If new length exceeds \fCmax_size()\fP\&. .RE .PP .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::insert()\fP\&. .SS "template void \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::insert (iterator __p, size_type __n, _CharT __c)\fC [inline]\fP, \fC [inherited]\fP" .PP Insert multiple characters\&. .PP \fBParameters\fP .RS 4 \fI__p\fP Iterator referencing location in string to insert at\&. .br \fI__n\fP Number of characters to insert .br \fI__c\fP The character to insert\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::length_error\fP If new length exceeds \fCmax_size()\fP\&. .RE .PP Inserts \fI__n\fP copies of character \fI__c\fP starting at the position referenced by iterator \fI__p\fP\&. If adding characters causes the length to exceed max_size(), length_error is thrown\&. The value of the string doesn't change if an error is thrown\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP\&. .PP Referenced by \fBstd::basic_string< _CharT, _Traits, _Alloc >::insert()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::insert()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::insert()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::insert()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::insert()\fP\&. .SS "template template \fB_If_sv\fP< _Tp, \fBbasic_string\fP & > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::insert (size_type __pos, \fBconst\fP _Tp & __svt)\fC [inline]\fP, \fC [inherited]\fP" .PP Insert a string_view\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP Position in string to insert at\&. .br \fI__svt\fP The object convertible to string_view to insert\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::insert()\fP\&. .SS "template template \fB_If_sv\fP< _Tp, \fBbasic_string\fP & > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::insert (size_type __pos1, \fBconst\fP _Tp & __svt, size_type __pos2, size_type __n = \fC\fBnpos\fP\fP)\fC [inline]\fP, \fC [inherited]\fP" .PP Insert a string_view\&. .PP \fBParameters\fP .RS 4 \fI__pos1\fP Position in string to insert at\&. .br \fI__svt\fP The object convertible to string_view to insert from\&. .br \fI__pos2\fP Position in string_view to insert from\&. .br \fI__n\fP The number of characters to insert\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP\&. .SS "template \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::insert (size_type __pos1, \fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str)\fC [inline]\fP, \fC [inherited]\fP" .PP Insert value of a string\&. .PP \fBParameters\fP .RS 4 \fI__pos1\fP Position in string to insert at\&. .br \fI__str\fP The string to insert\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::length_error\fP If new length exceeds \fCmax_size()\fP\&. .RE .PP Inserts value of \fI__str\fP starting at \fI__pos1\fP\&. If adding characters causes the length to exceed max_size(), length_error is thrown\&. The value of the string doesn't change if an error is thrown\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::insert()\fP\&. .SS "template \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::insert (size_type __pos1, \fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str, size_type __pos2, size_type __n = \fC\fBnpos\fP\fP)\fC [inline]\fP, \fC [inherited]\fP" .PP Insert a substring\&. .PP \fBParameters\fP .RS 4 \fI__pos1\fP Position in string to insert at\&. .br \fI__str\fP The string to insert\&. .br \fI__pos2\fP Start of characters in str to insert\&. .br \fI__n\fP Number of characters to insert\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::length_error\fP If new length exceeds \fCmax_size()\fP\&. .br \fIstd::out_of_range\fP If \fIpos1\fP > size() or \fI__pos2\fP > \fIstr\&.size()\fP\&. .RE .PP Starting at \fIpos1\fP, insert \fI__n\fP character of \fI__str\fP beginning with \fI__pos2\fP\&. If adding characters causes the length to exceed max_size(), length_error is thrown\&. If \fI__pos1\fP is beyond the end of this string or \fI__pos2\fP is beyond the end of \fI__str\fP, out_of_range is thrown\&. The value of the string doesn't change if an error is thrown\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::insert()\fP\&. .SS "template, typename _Allocator = std::allocator<_CharT>> size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::length () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Returns the number of characters in the string, not including any null-termination\&. .SS "template, typename _Allocator = std::allocator<_CharT>> size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::max_size () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Returns the size() of the largest possible string\&. .SS "template \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::operator \fB__sv_type\fP () const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" .PP Convert to a string_view\&. .PP \fBReturns\fP .RS 4 A string_view\&. .RE .PP .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::data()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::size()\fP\&. .SS "template template \fB_If_sv\fP< _Tp, \fBbasic_string\fP & > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::operator+= (\fBconst\fP _Tp & __svt)\fC [inline]\fP, \fC [inherited]\fP" .PP Append a string_view\&. .PP \fBParameters\fP .RS 4 \fI__svt\fP The object convertible to string_view to be appended\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::append()\fP\&. .SS "template \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::operator+= (\fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str)\fC [inline]\fP, \fC [inherited]\fP" .PP Append a string to this string\&. .PP \fBParameters\fP .RS 4 \fI__str\fP The string to append\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::append()\fP\&. .SS "template template \fB_If_sv\fP< _Tp, \fBbasic_string\fP & > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::replace (const_iterator __i1, const_iterator __i2, \fBconst\fP _Tp & __svt)\fC [inline]\fP, \fC [inherited]\fP" .PP Replace range of characters with string_view\&. .PP \fBParameters\fP .RS 4 \fI__i1\fP An iterator referencing the start position to replace at\&. .br \fI__i2\fP An iterator referencing the end position for the replace\&. .br \fI__svt\fP The object convertible to string_view to insert from\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::begin()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP\&. .SS "template template \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::replace (iterator __i1, iterator __i2, \fB_InputIterator\fP __k1, \fB_InputIterator\fP __k2)\fC [inline]\fP, \fC [inherited]\fP" .PP Replace range of characters with range\&. .PP \fBParameters\fP .RS 4 \fI__i1\fP Iterator referencing start of range to replace\&. .br \fI__i2\fP Iterator referencing end of range to replace\&. .br \fI__k1\fP Iterator referencing start of range to insert\&. .br \fI__k2\fP Iterator referencing end of range to insert\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::length_error\fP If new length exceeds \fCmax_size()\fP\&. .RE .PP Removes the characters in the range [__i1,__i2)\&. In place, characters in the range [__k1,__k2) are inserted\&. If the length of result exceeds max_size(), length_error is thrown\&. The value of the string doesn't change if an error is thrown\&. .SS "template \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::replace (iterator __i1, iterator __i2, \fBconst\fP _CharT * __s)\fC [inline]\fP, \fC [inherited]\fP" .PP Replace range of characters with C string\&. .PP \fBParameters\fP .RS 4 \fI__i1\fP Iterator referencing start of range to replace\&. .br \fI__i2\fP Iterator referencing end of range to replace\&. .br \fI__s\fP C string value to insert\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::length_error\fP If new length exceeds \fCmax_size()\fP\&. .RE .PP Removes the characters in the range [__i1,__i2)\&. In place, the characters of \fI__s\fP are inserted\&. If the length of result exceeds max_size(), length_error is thrown\&. The value of the string doesn't change if an error is thrown\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP\&. .SS "template \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::replace (iterator __i1, iterator __i2, \fBconst\fP _CharT * __s, size_type __n)\fC [inline]\fP, \fC [inherited]\fP" .PP Replace range of characters with C substring\&. .PP \fBParameters\fP .RS 4 \fI__i1\fP Iterator referencing start of range to replace\&. .br \fI__i2\fP Iterator referencing end of range to replace\&. .br \fI__s\fP C string value to insert\&. .br \fI__n\fP Number of characters from s to insert\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::length_error\fP If new length exceeds \fCmax_size()\fP\&. .RE .PP Removes the characters in the range [__i1,__i2)\&. In place, the first \fI__n\fP characters of \fI__s\fP are inserted\&. If the length of result exceeds max_size(), length_error is thrown\&. The value of the string doesn't change if an error is thrown\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP\&. .SS "template \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::replace (iterator __i1, iterator __i2, \fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str)\fC [inline]\fP, \fC [inherited]\fP" .PP Replace range of characters with string\&. .PP \fBParameters\fP .RS 4 \fI__i1\fP Iterator referencing start of range to replace\&. .br \fI__i2\fP Iterator referencing end of range to replace\&. .br \fI__str\fP String value to insert\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::length_error\fP If new length exceeds \fCmax_size()\fP\&. .RE .PP Removes the characters in the range [__i1,__i2)\&. In place, the value of \fI__str\fP is inserted\&. If the length of result exceeds max_size(), length_error is thrown\&. The value of the string doesn't change if an error is thrown\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP\&. .SS "template \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::replace (iterator __i1, iterator __i2, \fBinitializer_list\fP< _CharT > __l)\fC [inline]\fP, \fC [inherited]\fP" .PP Replace range of characters with initializer_list\&. .PP \fBParameters\fP .RS 4 \fI__i1\fP Iterator referencing start of range to replace\&. .br \fI__i2\fP Iterator referencing end of range to replace\&. .br \fI__l\fP The initializer_list of characters to insert\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::length_error\fP If new length exceeds \fCmax_size()\fP\&. .RE .PP Removes the characters in the range [__i1,__i2)\&. In place, characters in the range [__k1,__k2) are inserted\&. If the length of result exceeds max_size(), length_error is thrown\&. The value of the string doesn't change if an error is thrown\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP\&. .SS "template \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::replace (iterator __i1, iterator __i2, size_type __n, _CharT __c)\fC [inline]\fP, \fC [inherited]\fP" .PP Replace range of characters with multiple characters\&. .PP \fBParameters\fP .RS 4 \fI__i1\fP Iterator referencing start of range to replace\&. .br \fI__i2\fP Iterator referencing end of range to replace\&. .br \fI__n\fP Number of characters to insert\&. .br \fI__c\fP Character to insert\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::length_error\fP If new length exceeds \fCmax_size()\fP\&. .RE .PP Removes the characters in the range [__i1,__i2)\&. In place, \fI__n\fP copies of \fI__c\fP are inserted\&. If the length of result exceeds max_size(), length_error is thrown\&. The value of the string doesn't change if an error is thrown\&. .SS "template template \fB_If_sv\fP< _Tp, \fBbasic_string\fP & > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::replace (size_type __pos, size_type __n, \fBconst\fP _Tp & __svt)\fC [inline]\fP, \fC [inherited]\fP" .PP Replace range of characters with string_view\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP The position to replace at\&. .br \fI__n\fP The number of characters to replace\&. .br \fI__svt\fP The object convertible to string_view to insert\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP\&. .SS "template \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::replace (size_type __pos, size_type __n, \fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str)\fC [inline]\fP, \fC [inherited]\fP" .PP Replace characters with value from another string\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP Index of first character to replace\&. .br \fI__n\fP Number of characters to be replaced\&. .br \fI__str\fP String to insert\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::out_of_range\fP If \fIpos\fP is beyond the end of this string\&. .br \fIstd::length_error\fP If new length exceeds \fCmax_size()\fP\&. .RE .PP Removes the characters in the range [__pos,__pos+__n) from this string\&. In place, the value of \fI__str\fP is inserted\&. If \fI__pos\fP is beyond end of string, out_of_range is thrown\&. If the length of the result exceeds max_size(), length_error is thrown\&. The value of the string doesn't change if an error is thrown\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP\&. .PP Referenced by \fBstd::basic_string< _CharT, _Traits, _Alloc >::append()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::assign()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::insert()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::insert()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::insert()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP\&. .SS "template template \fB_If_sv\fP< _Tp, \fBbasic_string\fP & > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::replace (size_type __pos1, size_type __n1, \fBconst\fP _Tp & __svt, size_type __pos2, size_type __n2 = \fC\fBnpos\fP\fP)\fC [inline]\fP, \fC [inherited]\fP" .PP Replace range of characters with string_view\&. .PP \fBParameters\fP .RS 4 \fI__pos1\fP The position to replace at\&. .br \fI__n1\fP The number of characters to replace\&. .br \fI__svt\fP The object convertible to string_view to insert from\&. .br \fI__pos2\fP The position in the string_view to insert from\&. .br \fI__n2\fP The number of characters to insert\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP\&. .SS "template \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::replace (size_type __pos1, size_type __n1, \fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str, size_type __pos2, size_type __n2 = \fC\fBnpos\fP\fP)\fC [inline]\fP, \fC [inherited]\fP" .PP Replace characters with value from another string\&. .PP \fBParameters\fP .RS 4 \fI__pos1\fP Index of first character to replace\&. .br \fI__n1\fP Number of characters to be replaced\&. .br \fI__str\fP String to insert\&. .br \fI__pos2\fP Index of first character of str to use\&. .br \fI__n2\fP Number of characters from str to use\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::out_of_range\fP If \fI__pos1\fP > size() or \fI__pos2\fP > __str\&.size()\&. .br \fIstd::length_error\fP If new length exceeds \fCmax_size()\fP\&. .RE .PP Removes the characters in the range [__pos1,__pos1 + n) from this string\&. In place, the value of \fI__str\fP is inserted\&. If \fI__pos\fP is beyond end of string, out_of_range is thrown\&. If the length of the result exceeds max_size(), length_error is thrown\&. The value of the string doesn't change if an error is thrown\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP\&. .SS "template, typename _Allocator = std::allocator<_CharT>> void \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::reserve ()" .PP Equivalent to shrink_to_fit()\&. .SS "template, typename _Allocator = std::allocator<_CharT>> void \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::reserve (size_type __res_arg)" .PP Attempt to preallocate enough memory for specified number of characters\&. .PP \fBParameters\fP .RS 4 \fI__res_arg\fP Number of characters required\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::length_error\fP If \fI__res_arg\fP exceeds \fCmax_size()\fP\&. .RE .PP This function attempts to reserve enough memory for the string to hold the specified number of characters\&. If the number requested is more than max_size(), length_error is thrown\&. .PP The advantage of this function is that if optimal code is a necessity and the user can determine the string length that will be required, the user can reserve the memory in advance, and thus prevent a possible reallocation of memory and copying of string data\&. .SS "template template \fB_If_sv\fP< _Tp, size_type > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::rfind (\fBconst\fP _Tp & __svt, size_type __pos = \fC\fBnpos\fP\fP) const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" .PP Find last position of a string_view\&. .PP \fBParameters\fP .RS 4 \fI__svt\fP The object convertible to string_view to locate\&. .br \fI__pos\fP Index of character to search back from (default end)\&. .RE .PP \fBReturns\fP .RS 4 Index of start of last occurrence\&. .RE .PP .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::rfind()\fP\&. .SS "template size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::rfind (\fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str, size_type __pos = \fC\fBnpos\fP\fP) const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" .PP Find last position of a string\&. .PP \fBParameters\fP .RS 4 \fI__str\fP String to locate\&. .br \fI__pos\fP Index of character to search back from (default end)\&. .RE .PP \fBReturns\fP .RS 4 Index of start of last occurrence\&. .RE .PP Starting from \fI__pos\fP, searches backward for value of \fI__str\fP within this string\&. If found, returns the index where it begins\&. If not found, returns npos\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::rfind()\fP\&. .PP Referenced by \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_last_of()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::rfind()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::rfind()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::rfind()\fP\&. .SS "template, typename _Allocator = std::allocator<_CharT>> size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::size () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Returns the number of characters in the string, not including any null-termination\&. .SS "template void \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::swap (\fBbasic_string\fP< _CharT, _Traits, _Alloc > & __s)\fC [noexcept]\fP, \fC [inherited]\fP" .PP Swap contents with another string\&. .PP \fBParameters\fP .RS 4 \fI__s\fP String to swap with\&. .RE .PP Exchanges the contents of this string with that of \fI__s\fP in constant time\&. .PP Referenced by \fBstd::basic_string< _CharT, _Traits, _Alloc >::assign()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::operator=()\fP\&. .SH "Member Data Documentation" .PP .SS "template, typename _Allocator = std::allocator<_CharT>> const \fBbasic_string\fP< _CharT, _Traits, _Alloc >::size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::npos\fC [static]\fP" .PP Value returned by various member functions when they fail\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.