.TH "__gnu_debug::basic_string< _CharT, _Traits, _Allocator >" 3cxx "Sat Aug 14 2021" "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 Inherits \fB__gnu_debug::_Safe_container< basic_string< _CharT, std::char_traits< _CharT >, std::allocator< _CharT > >, std::allocator< _CharT >, _Safe_sequence, bool(_GLIBCXX_USE_CXX11_ABI)>\fP, and \fBstd::basic_string< _CharT, std::char_traits< _CharT >, std::allocator< _CharT > >\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 _Base::pointer \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 (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 &__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 void \fB_M_invalidate_if\fP (_Predicate __pred)" .br .ti -1c .RI "\fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > & \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 void \fB_M_transfer_from_if\fP (\fB_Safe_sequence\fP &__from, _Predicate __pred)" .br .ti -1c .RI "_CharT * \fB_S_construct\fP (_InIterator __beg, _InIterator __end, const \fBstd::allocator\fP< _CharT > &__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 "\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< \fBstd::allocator\fP< _CharT > >::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(std::declval< \fB_Base\fP & >()\&.assign(std::move(__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 "\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 "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 "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 "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 "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 "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 "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 "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 "_GLIBCXX_NODISCARD bool \fBempty\fP () const noexcept" .br .ti -1c .RI "_GLIBCXX_NODISCARD 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 (\fBiterator\fP __first, \fBiterator\fP __last)" .br .RI "Remove a range of characters\&. " .ti -1c .RI "\fBiterator\fP \fBerase\fP (\fBiterator\fP __first, \fBiterator\fP __last)" .br .ti -1c .RI "\fBiterator\fP \fBerase\fP (\fBiterator\fP __position)" .br .RI "Remove one character\&. " .ti -1c .RI "\fBiterator\fP \fBerase\fP (\fBiterator\fP __position)" .br .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 "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 "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 "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 "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 "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 "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 "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 "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 "\fBbasic_string\fP & \fBinsert\fP (size_type __pos, size_type __n, _CharT __c)" .br .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 \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 "size_type \fBmax_size\fP () const noexcept" .br .RI "Returns the size() of the largest possible string\&. " .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 "\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 "\fBbasic_string\fP & \fBreplace\fP (\fBiterator\fP __i1, \fBiterator\fP __i2, _CharT *__k1, _CharT *__k2)" .br .ti -1c .RI "\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 "\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 "\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 (size_type __res_arg=0)" .br .RI "Attempt to preallocate enough memory for specified number of characters\&. " .ti -1c .RI "void \fBreserve\fP (size_type __res_arg=0)" .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 "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 "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 "Public Attributes" .in +1c .ti -1c .RI "\fB_Safe_iterator_base\fP * \fB_M_const_iterators\fP" .br .RI "The list of constant iterators that reference this container\&. " .ti -1c .RI "\fB_Safe_iterator_base\fP * \fB_M_iterators\fP" .br .RI "The list of mutable iterators that reference this container\&. " .ti -1c .RI "unsigned int \fB_M_version\fP" .br .RI "The container version number\&. This number may never be 0\&. " .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 "void \fB_M_detach_all\fP ()" .br .ti -1c .RI "void \fB_M_detach_singular\fP ()" .br .ti -1c .RI "__gnu_cxx::__mutex & \fB_M_get_mutex\fP () throw ()" .br .ti -1c .RI "void \fB_M_invalidate_all\fP () const" .br .ti -1c .RI "void \fB_M_revalidate_singular\fP ()" .br .ti -1c .RI "\fB_Safe_container\fP & \fB_M_safe\fP () noexcept" .br .ti -1c .RI "void \fB_M_swap\fP (\fB_Safe_sequence_base\fP &__x) 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\&. .PP Definition at line 86 of file debug/string\&. .SH "Member Function Documentation" .PP .SS "void __gnu_debug::_Safe_sequence_base::_M_detach_all ()\fC [protected]\fP, \fC [inherited]\fP" Detach all iterators, leaving them singular\&. .PP Referenced by __gnu_debug::_Safe_sequence_base::~_Safe_sequence_base()\&. .SS "void __gnu_debug::_Safe_sequence_base::_M_detach_singular ()\fC [protected]\fP, \fC [inherited]\fP" Detach all singular iterators\&. .PP \fBPostcondition\fP .RS 4 for all iterators i attached to this sequence, i->_M_version == _M_version\&. .RE .PP .SS "__gnu_cxx::__mutex& __gnu_debug::_Safe_sequence_base::_M_get_mutex ()\fC [protected]\fP, \fC [inherited]\fP" For use in _Safe_sequence\&. .PP Referenced by __gnu_debug::_Safe_sequence< _Sequence >::_M_transfer_from_if()\&. .SS "void __gnu_debug::_Safe_sequence_base::_M_invalidate_all () const\fC [inline]\fP, \fC [protected]\fP, \fC [inherited]\fP" Invalidates all iterators\&. .PP Definition at line 256 of file safe_base\&.h\&. .PP References __gnu_debug::_Safe_sequence_base::_M_version\&. .SS "template template void \fB__gnu_debug::_Safe_sequence\fP< _Sequence >::_M_invalidate_if (_Predicate __pred)\fC [inherited]\fP" Invalidates all iterators \fCx\fP that reference this sequence, are not singular, and for which \fC__pred(x)\fP returns \fCtrue\fP\&. \fC__pred\fP will be invoked with the normal iterators nested in the safe ones\&. .PP Definition at line 37 of file safe_sequence\&.tcc\&. .SS "void __gnu_debug::_Safe_sequence_base::_M_revalidate_singular ()\fC [protected]\fP, \fC [inherited]\fP" Revalidates all attached singular iterators\&. This method may be used to validate iterators that were invalidated before (but for some reason, such as an exception, need to become valid again)\&. .SS "void __gnu_debug::_Safe_sequence_base::_M_swap (\fB_Safe_sequence_base\fP & __x)\fC [protected]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" Swap this sequence with the given sequence\&. This operation also swaps ownership of the iterators, so that when the operation is complete all iterators that originally referenced one container now reference the other container\&. .SS "template template void \fB__gnu_debug::_Safe_sequence\fP< _Sequence >::_M_transfer_from_if (\fB_Safe_sequence\fP< _Sequence > & __from, _Predicate __pred)\fC [inherited]\fP" Transfers all iterators \fCx\fP that reference \fCfrom\fP sequence, are not singular, and for which \fC__pred(x)\fP returns \fCtrue\fP\&. \fC__pred\fP will be invoked with the normal iterators nested in the safe ones\&. .PP Definition at line 68 of file safe_sequence\&.tcc\&. .PP References std::__addressof(), __gnu_debug::_Safe_sequence_base::_M_const_iterators, __gnu_debug::_Safe_iterator_base::_M_detach_single(), __gnu_debug::_Safe_sequence_base::_M_get_mutex(), __gnu_debug::_Safe_sequence_base::_M_iterators, __gnu_debug::_Safe_iterator_base::_M_next, __gnu_debug::_Safe_iterator_base::_M_prior, __gnu_debug::_Safe_iterator_base::_M_sequence, and __gnu_debug::_Safe_iterator_base::_M_version\&. .SS "\fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > > & \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::append (const \fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > & __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 Definition at line 4211 of file basic_string\&.tcc\&. .SS "\fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > > & \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::append (const \fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > & __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 Definition at line 4227 of file basic_string\&.tcc\&. .SS "\fBbasic_string\fP& \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::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 Definition at line 4268 of file basic_string\&.h\&. .SS "\fBbasic_string\fP& \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::assign (\fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > && __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 Definition at line 4350 of file basic_string\&.h\&. .SS "\fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > > & \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::assign (const \fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > & __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 Definition at line 4338 of file basic_string\&.tcc\&. .SS "\fBbasic_string\fP& \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::assign (const \fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > & __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 Definition at line 4372 of file basic_string\&.h\&. .SS "reference \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::at (size_type __n)\fC [inline]\fP, \fC [inherited]\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\&. .PP Definition at line 4094 of file basic_string\&.h\&. .SS "template, typename _Allocator = std::allocator<_CharT>> reference \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::at\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\&. .PP Definition at line 4094 of file basic_string\&.h\&. .SS "const_reference \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::at (size_type __n) const\fC [inline]\fP, \fC [inherited]\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\&. .PP Definition at line 4072 of file basic_string\&.h\&. .SS "template, typename _Allocator = std::allocator<_CharT>> const_reference \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::at\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\&. .PP Definition at line 4072 of file basic_string\&.h\&. .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\&. .PP Definition at line 4133 of file basic_string\&.h\&. .SS "const_reference \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::back () const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" Returns a read-only (constant) reference to the data at the last element of the string\&. .PP Definition at line 4144 of file basic_string\&.h\&. .SS "template, typename _Allocator = std::allocator<_CharT>> const_reference \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::back\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) reference to the data at the last element of the string\&. .PP Definition at line 4144 of file basic_string\&.h\&. .SS "size_type \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::capacity () const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" Returns the total number of characters that the string can hold before needing to allocate more memory\&. .PP Definition at line 3968 of file basic_string\&.h\&. .SS "template, typename _Allocator = std::allocator<_CharT>> size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::capacity\fC [inline]\fP, \fC [noexcept]\fP" Returns the total number of characters that the string can hold before needing to allocate more memory\&. .PP Definition at line 3968 of file basic_string\&.h\&. .SS "int \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::compare (const \fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > & __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 Definition at line 5754 of file basic_string\&.h\&. .SS "int \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::compare (size_type __pos, size_type __n, const \fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > & __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 Definition at line 5847 of file basic_string\&.tcc\&. .SS "int \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::compare (size_type __pos1, size_type __n1, const \fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > & __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 Definition at line 5873 of file basic_string\&.tcc\&. .SS "_GLIBCXX_NODISCARD bool \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::empty () const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" Returns true if the string is empty\&. Equivalent to \fC*this == ''\fP\&. .PP Definition at line 4018 of file basic_string\&.h\&. .SS "template, typename _Allocator = std::allocator<_CharT>> _GLIBCXX_NODISCARD bool \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::empty\fC [inline]\fP, \fC [noexcept]\fP" Returns true if the string is empty\&. Equivalent to \fC*this == ''\fP\&. .PP Definition at line 4018 of file basic_string\&.h\&. .SS "\fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::\fBiterator\fP \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::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\&. .PP Definition at line 4737 of file basic_string\&.tcc\&. .SS "\fBiterator\fP \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::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\&. .PP Definition at line 4717 of file basic_string\&.h\&. .SS "size_type \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::find (const \fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > & __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 Definition at line 5262 of file basic_string\&.h\&. .SS "size_type \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::find_first_not_of (const \fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > & __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 Definition at line 5570 of file basic_string\&.h\&. .SS "size_type \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::find_first_of (const \fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > & __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 Definition at line 5403 of file basic_string\&.h\&. .SS "size_type \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::find_last_not_of (const \fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > & __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 Definition at line 5652 of file basic_string\&.h\&. .SS "size_type \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::find_last_of (const \fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > & __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 Definition at line 5487 of file basic_string\&.h\&. .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\&. .PP Definition at line 4111 of file basic_string\&.h\&. .SS "const_reference \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::front () const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" Returns a read-only (constant) reference to the data at the first element of the string\&. .PP Definition at line 4122 of file basic_string\&.h\&. .SS "template, typename _Allocator = std::allocator<_CharT>> const_reference \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::front\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) reference to the data at the first element of the string\&. .PP Definition at line 4122 of file basic_string\&.h\&. .SS "allocator_type \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::get_allocator () const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" .PP Return copy of allocator used to construct this string\&. .PP Definition at line 5232 of file basic_string\&.h\&. .SS "template, typename _Allocator = std::allocator<_CharT>> allocator_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::get_allocator\fC [inline]\fP, \fC [noexcept]\fP" .PP Return copy of allocator used to construct this string\&. .PP Definition at line 5232 of file basic_string\&.h\&. .SS "\fBiterator\fP \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::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\&. .PP Definition at line 4641 of file basic_string\&.h\&. .SS "void \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::insert (iterator __p, _InputIterator __beg, _InputIterator __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 Definition at line 4506 of file basic_string\&.h\&. .SS "void \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::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 Definition at line 4517 of file basic_string\&.h\&. .SS "void \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::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 Definition at line 4489 of file basic_string\&.h\&. .SS "\fBbasic_string\fP& \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::insert (size_type __pos1, const \fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > & __str)\fC [inline]\fP, \fC [inherited]\fP" .PP Insert value of a string\&. .PP \fBParameters\fP .RS 4 \fI__pos1\fP Iterator referencing location 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 Definition at line 4537 of file basic_string\&.h\&. .SS "\fBbasic_string\fP& \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::insert (size_type __pos1, const \fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > & __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 Iterator referencing location 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 Definition at line 4559 of file basic_string\&.h\&. .SS "size_type \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::length () const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" .PP Returns the number of characters in the string, not including any null-termination\&. .PP Definition at line 3911 of file basic_string\&.h\&. .SS "template, typename _Allocator = std::allocator<_CharT>> size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::length\fC [inline]\fP, \fC [noexcept]\fP" .PP Returns the number of characters in the string, not including any null-termination\&. .PP Definition at line 3911 of file basic_string\&.h\&. .SS "size_type \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::max_size () const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" .PP Returns the size() of the largest possible string\&. .PP Definition at line 3916 of file basic_string\&.h\&. .SS "template, typename _Allocator = std::allocator<_CharT>> size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::max_size\fC [inline]\fP, \fC [noexcept]\fP" .PP Returns the size() of the largest possible string\&. .PP Definition at line 3916 of file basic_string\&.h\&. .SS "\fBbasic_string\fP& \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::operator+= (const \fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > & __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 Definition at line 4158 of file basic_string\&.h\&. .SS "\fBbasic_string\fP& \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::replace (iterator __i1, iterator __i2, _InputIterator __k1, _InputIterator __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\&. .PP Definition at line 4965 of file basic_string\&.h\&. .SS "\fBbasic_string\fP& \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::replace (iterator __i1, iterator __i2, const _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 Definition at line 4920 of file basic_string\&.h\&. .SS "\fBbasic_string\fP& \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::replace (iterator __i1, iterator __i2, const _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 Definition at line 4899 of file basic_string\&.h\&. .SS "\fBbasic_string\fP& \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::replace (iterator __i1, iterator __i2, const \fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > & __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 Definition at line 4880 of file basic_string\&.h\&. .SS "\fBbasic_string\fP& \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::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 Definition at line 5034 of file basic_string\&.h\&. .SS "\fBbasic_string\fP& \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::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\&. .PP Definition at line 4941 of file basic_string\&.h\&. .SS "\fBbasic_string\fP& \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::replace (size_type __pos, size_type __n, const \fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > & __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 Definition at line 4771 of file basic_string\&.h\&. .SS "\fBbasic_string\fP& \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::replace (size_type __pos1, size_type __n1, const \fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > & __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 Definition at line 4793 of file basic_string\&.h\&. .SS "void \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::reserve (size_type __res_arg = \fC0\fP)\fC [inherited]\fP" .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\&. .PP Definition at line 3989 of file basic_string\&.tcc\&. .SS "template, typename _Allocator = std::allocator<_CharT>> void \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::reserve" .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\&. .PP Definition at line 3989 of file basic_string\&.tcc\&. .SS "size_type \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::rfind (const \fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > & __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 Definition at line 5324 of file basic_string\&.h\&. .SS "size_type \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::size () const\fC [inline]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" .PP Returns the number of characters in the string, not including any null-termination\&. .PP Definition at line 3905 of file basic_string\&.h\&. .SS "template, typename _Allocator = std::allocator<_CharT>> size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::size\fC [inline]\fP, \fC [noexcept]\fP" .PP Returns the number of characters in the string, not including any null-termination\&. .PP Definition at line 3905 of file basic_string\&.h\&. .SS "void \fBstd::basic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT > , \fBstd::allocator\fP< _CharT > >::swap (\fBbasic_string\fP< _CharT, \fBstd::char_traits\fP< _CharT >, \fBstd::allocator\fP< _CharT > > & __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 Definition at line 5187 of file basic_string\&.tcc\&. .SH "Member Data Documentation" .PP .SS "\fB_Safe_iterator_base\fP* __gnu_debug::_Safe_sequence_base::_M_const_iterators\fC [inherited]\fP" .PP The list of constant iterators that reference this container\&. .PP Definition at line 197 of file safe_base\&.h\&. .PP Referenced by __gnu_debug::_Safe_sequence< _Sequence >::_M_transfer_from_if()\&. .SS "\fB_Safe_iterator_base\fP* __gnu_debug::_Safe_sequence_base::_M_iterators\fC [inherited]\fP" .PP The list of mutable iterators that reference this container\&. .PP Definition at line 194 of file safe_base\&.h\&. .PP Referenced by __gnu_debug::_Safe_sequence< _Sequence >::_M_transfer_from_if()\&. .SS "unsigned int __gnu_debug::_Safe_sequence_base::_M_version\fC [mutable]\fP, \fC [inherited]\fP" .PP The container version number\&. This number may never be 0\&. .PP Definition at line 200 of file safe_base\&.h\&. .PP Referenced by __gnu_debug::_Safe_sequence_base::_M_invalidate_all()\&. .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\&. .PP Definition at line 3355 of file basic_string\&.h\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.