.TH "std::basic_string< _CharT, _Traits, _Alloc >" 3cxx "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::basic_string< _CharT, _Traits, _Alloc > \- Managing sequences of characters and character-like objects\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherited by \fB__gnu_debug::basic_string< _CharT, _Traits, _Allocator >\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "\fBtypedef\fP _Alloc \fBallocator_type\fP" .br .ti -1c .RI "\fBtypedef\fP __gnu_cxx::__normal_iterator< const_pointer, \fBbasic_string\fP > \fBconst_iterator\fP" .br .ti -1c .RI "\fBtypedef\fP _CharT_alloc_type::const_pointer \fBconst_pointer\fP" .br .ti -1c .RI "\fBtypedef\fP \fBconst\fP value_type & \fBconst_reference\fP" .br .ti -1c .RI "\fBtypedef\fP \fBstd::reverse_iterator\fP< const_iterator > \fBconst_reverse_iterator\fP" .br .ti -1c .RI "\fBtypedef\fP _CharT_alloc_type::difference_type \fBdifference_type\fP" .br .ti -1c .RI "\fBtypedef\fP __gnu_cxx::__normal_iterator< pointer, \fBbasic_string\fP > \fBiterator\fP" .br .ti -1c .RI "\fBtypedef\fP _CharT_alloc_type::pointer \fBpointer\fP" .br .ti -1c .RI "\fBtypedef\fP value_type & \fBreference\fP" .br .ti -1c .RI "\fBtypedef\fP \fBstd::reverse_iterator\fP< iterator > \fBreverse_iterator\fP" .br .ti -1c .RI "\fBtypedef\fP _CharT_alloc_type::size_type \fBsize_type\fP" .br .ti -1c .RI "\fBtypedef\fP _Traits \fBtraits_type\fP" .br .ti -1c .RI "\fBtypedef\fP _Traits::char_type \fBvalue_type\fP" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBbasic_string\fP () \fBnoexcept\fP" .br .RI "Default constructor creates an empty string\&. " .ti -1c .RI "template<\fBclass\fP \fB_InputIterator\fP > \fBbasic_string\fP (\fB_InputIterator\fP \fB__beg\fP, \fB_InputIterator\fP __end, \fBconst\fP _Alloc &__a=_Alloc())" .br .RI "Construct string as copy of a range\&. " .ti -1c .RI "\fBbasic_string\fP (\fBbasic_string\fP &&\fB__str\fP) \fBnoexcept\fP" .br .RI "Move construct string\&. " .ti -1c .RI "\fBbasic_string\fP (\fBbasic_string\fP &&\fB__str\fP, \fBconst\fP _Alloc &__a)" .br .ti -1c .RI "\fBbasic_string\fP (\fBconst\fP _Alloc &__a)" .br .RI "Construct an empty string using allocator \fIa\fP\&. " .ti -1c .RI "\fBbasic_string\fP (\fBconst\fP _CharT *\fB__s\fP, \fBconst\fP _Alloc &__a=_Alloc())" .br .RI "Construct string as copy of a C string\&. " .ti -1c .RI "\fBbasic_string\fP (\fBconst\fP _CharT *\fB__s\fP, size_type __n, \fBconst\fP _Alloc &__a=_Alloc())" .br .RI "Construct string initialized by a character array\&. " .ti -1c .RI "\fBbasic_string\fP (\fBconst\fP \fBbasic_string\fP &\fB__str\fP)" .br .RI "Construct string with copy of value of \fIstr\fP\&. " .ti -1c .RI "\fBbasic_string\fP (\fBconst\fP \fBbasic_string\fP &\fB__str\fP, \fBconst\fP _Alloc &__a)" .br .ti -1c .RI "\fBbasic_string\fP (\fBconst\fP \fBbasic_string\fP &\fB__str\fP, size_type \fB__pos\fP, \fBconst\fP _Alloc &__a=_Alloc())" .br .RI "Construct string as copy of a substring\&. " .ti -1c .RI "\fBbasic_string\fP (\fBconst\fP \fBbasic_string\fP &\fB__str\fP, size_type \fB__pos\fP, size_type __n)" .br .RI "Construct string as copy of a substring\&. " .ti -1c .RI "\fBbasic_string\fP (\fBconst\fP \fBbasic_string\fP &\fB__str\fP, size_type \fB__pos\fP, size_type __n, \fBconst\fP _Alloc &__a)" .br .RI "Construct string as copy of a substring\&. " .ti -1c .RI "\fBbasic_string\fP (\fBinitializer_list\fP< _CharT > \fB__l\fP, \fBconst\fP _Alloc &__a=_Alloc())" .br .RI "Construct string from an initializer list\&. " .ti -1c .RI "\fBbasic_string\fP (size_type __n, _CharT __c, \fBconst\fP _Alloc &__a=_Alloc())" .br .RI "Construct string as multiple characters\&. " .ti -1c .RI "\fB~basic_string\fP () \fBnoexcept\fP" .br .RI "Destroy the string instance\&. " .ti -1c .RI "template<\fBtypename\fP \fB_InputIterator\fP > \fBbasic_string\fP< _CharT, _Traits, _Alloc > & \fB_M_replace_dispatch\fP (iterator \fB__i1\fP, iterator \fB__i2\fP, \fB_InputIterator\fP \fB__k1\fP, \fB_InputIterator\fP \fB__k2\fP, __false_type)" .br .ti -1c .RI "template<\fBtypename\fP \fB_InIterator\fP > _CharT * \fB_S_construct\fP (\fB_InIterator\fP \fB__beg\fP, \fB_InIterator\fP __end, \fBconst\fP _Alloc &__a, \fBforward_iterator_tag\fP)" .br .ti -1c .RI "template<\fBclass\fP \fB_InputIterator\fP > \fBbasic_string\fP & \fBappend\fP (\fB_InputIterator\fP __first, \fB_InputIterator\fP __last)" .br .RI "Append a range of characters\&. " .ti -1c .RI "\fBbasic_string\fP & \fBappend\fP (\fBconst\fP _CharT *\fB__s\fP)" .br .RI "Append a C string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBappend\fP (\fBconst\fP _CharT *\fB__s\fP, size_type __n)" .br .RI "Append a C substring\&. " .ti -1c .RI "\fBbasic_string\fP & \fBappend\fP (\fBconst\fP \fBbasic_string\fP &\fB__str\fP)" .br .RI "Append a string to this string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBappend\fP (\fBconst\fP \fBbasic_string\fP &\fB__str\fP, size_type \fB__pos\fP, size_type __n=\fBnpos\fP)" .br .RI "Append a substring\&. " .ti -1c .RI "\fBbasic_string\fP & \fBappend\fP (\fBinitializer_list\fP< _CharT > \fB__l\fP)" .br .RI "Append an initializer_list of characters\&. " .ti -1c .RI "\fBbasic_string\fP & \fBappend\fP (size_type __n, _CharT __c)" .br .RI "Append multiple characters\&. " .ti -1c .RI "template<\fBclass\fP \fB_InputIterator\fP > \fBbasic_string\fP & \fBassign\fP (\fB_InputIterator\fP __first, \fB_InputIterator\fP __last)" .br .RI "Set value to a range of characters\&. " .ti -1c .RI "\fBbasic_string\fP & \fBassign\fP (\fBbasic_string\fP &&\fB__str\fP) \fBnoexcept\fP(\fBallocator_traits\fP< _Alloc >::is_always_equal::value)" .br .RI "Set value to contents of another string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBassign\fP (\fBconst\fP _CharT *\fB__s\fP)" .br .RI "Set value to contents of a C string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBassign\fP (\fBconst\fP _CharT *\fB__s\fP, size_type __n)" .br .RI "Set value to a C substring\&. " .ti -1c .RI "\fBbasic_string\fP & \fBassign\fP (\fBconst\fP \fBbasic_string\fP &\fB__str\fP)" .br .RI "Set value to contents of another string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBassign\fP (\fBconst\fP \fBbasic_string\fP &\fB__str\fP, size_type \fB__pos\fP, size_type __n=\fBnpos\fP)" .br .RI "Set value to a substring of a string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBassign\fP (\fBinitializer_list\fP< _CharT > \fB__l\fP)" .br .RI "Set value to an initializer_list of characters\&. " .ti -1c .RI "\fBbasic_string\fP & \fBassign\fP (size_type __n, _CharT __c)" .br .RI "Set value to multiple characters\&. " .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) \fBconst\fP" .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 () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "iterator \fBbegin\fP ()" .br .ti -1c .RI "const_iterator \fBbegin\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "\fBconst\fP _CharT * \fBc_str\fP () \fBconst\fP \fBnoexcept\fP" .br .RI "Return const pointer to null-terminated contents\&. " .ti -1c .RI "size_type \fBcapacity\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "const_iterator \fBcbegin\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "const_iterator \fBcend\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "\fBvoid\fP \fBclear\fP () \fBnoexcept\fP" .br .ti -1c .RI "int \fBcompare\fP (\fBconst\fP _CharT *\fB__s\fP) \fBconst\fP \fBnoexcept\fP" .br .RI "Compare to a C string\&. " .ti -1c .RI "int \fBcompare\fP (\fBconst\fP \fBbasic_string\fP &\fB__str\fP) \fBconst\fP" .br .RI "Compare to a string\&. " .ti -1c .RI "int \fBcompare\fP (size_type \fB__pos\fP, size_type __n, \fBconst\fP \fBbasic_string\fP &\fB__str\fP) \fBconst\fP" .br .RI "Compare substring to a string\&. " .ti -1c .RI "int \fBcompare\fP (size_type \fB__pos\fP, size_type \fB__n1\fP, \fBconst\fP _CharT *\fB__s\fP) \fBconst\fP" .br .RI "Compare substring to a C string\&. " .ti -1c .RI "int \fBcompare\fP (size_type \fB__pos\fP, size_type \fB__n1\fP, \fBconst\fP _CharT *\fB__s\fP, size_type \fB__n2\fP) \fBconst\fP" .br .RI "Compare substring against a character array\&. " .ti -1c .RI "int \fBcompare\fP (size_type \fB__pos1\fP, size_type \fB__n1\fP, \fBconst\fP \fBbasic_string\fP &\fB__str\fP, size_type \fB__pos2\fP, size_type \fB__n2\fP=\fBnpos\fP) \fBconst\fP" .br .RI "Compare substring to a substring\&. " .ti -1c .RI "size_type \fBcopy\fP (_CharT *\fB__s\fP, size_type __n, size_type \fB__pos\fP=0) \fBconst\fP" .br .RI "Copy substring into C string\&. " .ti -1c .RI "\fBconst_reverse_iterator\fP \fBcrbegin\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "\fBconst_reverse_iterator\fP \fBcrend\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "\fBconst\fP _CharT * \fBdata\fP () \fBconst\fP \fBnoexcept\fP" .br .RI "Return const pointer to contents\&. " .ti -1c .RI "_GLIBCXX_NODISCARD bool \fBempty\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "iterator \fBend\fP ()" .br .ti -1c .RI "const_iterator \fBend\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "iterator \fBerase\fP (iterator __first, iterator __last)" .br .RI "Remove a range of characters\&. " .ti -1c .RI "iterator \fBerase\fP (iterator \fB__position\fP)" .br .RI "Remove one character\&. " .ti -1c .RI "\fBbasic_string\fP & \fBerase\fP (size_type \fB__pos\fP=0, size_type __n=\fBnpos\fP)" .br .RI "Remove characters\&. " .ti -1c .RI "size_type \fBfind\fP (_CharT __c, size_type \fB__pos\fP=0) \fBconst\fP \fBnoexcept\fP" .br .RI "Find position of a character\&. " .ti -1c .RI "size_type \fBfind\fP (\fBconst\fP _CharT *\fB__s\fP, size_type \fB__pos\fP, size_type __n) \fBconst\fP \fBnoexcept\fP" .br .RI "Find position of a C substring\&. " .ti -1c .RI "size_type \fBfind\fP (\fBconst\fP _CharT *\fB__s\fP, size_type \fB__pos\fP=0) \fBconst\fP \fBnoexcept\fP" .br .RI "Find position of a C string\&. " .ti -1c .RI "size_type \fBfind\fP (\fBconst\fP \fBbasic_string\fP &\fB__str\fP, size_type \fB__pos\fP=0) \fBconst\fP \fBnoexcept\fP" .br .RI "Find position of a string\&. " .ti -1c .RI "size_type \fBfind_first_not_of\fP (_CharT __c, size_type \fB__pos\fP=0) \fBconst\fP \fBnoexcept\fP" .br .RI "Find position of a different character\&. " .ti -1c .RI "size_type \fBfind_first_not_of\fP (\fBconst\fP _CharT *\fB__s\fP, size_type \fB__pos\fP, size_type __n) \fBconst\fP \fBnoexcept\fP" .br .RI "Find position of a character not in C substring\&. " .ti -1c .RI "size_type \fBfind_first_not_of\fP (\fBconst\fP _CharT *\fB__s\fP, size_type \fB__pos\fP=0) \fBconst\fP \fBnoexcept\fP" .br .RI "Find position of a character not in C string\&. " .ti -1c .RI "size_type \fBfind_first_not_of\fP (\fBconst\fP \fBbasic_string\fP &\fB__str\fP, size_type \fB__pos\fP=0) \fBconst\fP \fBnoexcept\fP" .br .RI "Find position of a character not in string\&. " .ti -1c .RI "size_type \fBfind_first_of\fP (_CharT __c, size_type \fB__pos\fP=0) \fBconst\fP \fBnoexcept\fP" .br .RI "Find position of a character\&. " .ti -1c .RI "size_type \fBfind_first_of\fP (\fBconst\fP _CharT *\fB__s\fP, size_type \fB__pos\fP, size_type __n) \fBconst\fP \fBnoexcept\fP" .br .RI "Find position of a character of C substring\&. " .ti -1c .RI "size_type \fBfind_first_of\fP (\fBconst\fP _CharT *\fB__s\fP, size_type \fB__pos\fP=0) \fBconst\fP \fBnoexcept\fP" .br .RI "Find position of a character of C string\&. " .ti -1c .RI "size_type \fBfind_first_of\fP (\fBconst\fP \fBbasic_string\fP &\fB__str\fP, size_type \fB__pos\fP=0) \fBconst\fP \fBnoexcept\fP" .br .RI "Find position of a character of string\&. " .ti -1c .RI "size_type \fBfind_last_not_of\fP (_CharT __c, size_type \fB__pos\fP=\fBnpos\fP) \fBconst\fP \fBnoexcept\fP" .br .RI "Find last position of a different character\&. " .ti -1c .RI "size_type \fBfind_last_not_of\fP (\fBconst\fP _CharT *\fB__s\fP, size_type \fB__pos\fP, size_type __n) \fBconst\fP \fBnoexcept\fP" .br .RI "Find last position of a character not in C substring\&. " .ti -1c .RI "size_type \fBfind_last_not_of\fP (\fBconst\fP _CharT *\fB__s\fP, size_type \fB__pos\fP=\fBnpos\fP) \fBconst\fP \fBnoexcept\fP" .br .RI "Find last position of a character not in C string\&. " .ti -1c .RI "size_type \fBfind_last_not_of\fP (\fBconst\fP \fBbasic_string\fP &\fB__str\fP, size_type \fB__pos\fP=\fBnpos\fP) \fBconst\fP \fBnoexcept\fP" .br .RI "Find last position of a character not in string\&. " .ti -1c .RI "size_type \fBfind_last_of\fP (_CharT __c, size_type \fB__pos\fP=\fBnpos\fP) \fBconst\fP \fBnoexcept\fP" .br .RI "Find last position of a character\&. " .ti -1c .RI "size_type \fBfind_last_of\fP (\fBconst\fP _CharT *\fB__s\fP, size_type \fB__pos\fP, size_type __n) \fBconst\fP \fBnoexcept\fP" .br .RI "Find last position of a character of C substring\&. " .ti -1c .RI "size_type \fBfind_last_of\fP (\fBconst\fP _CharT *\fB__s\fP, size_type \fB__pos\fP=\fBnpos\fP) \fBconst\fP \fBnoexcept\fP" .br .RI "Find last position of a character of C string\&. " .ti -1c .RI "size_type \fBfind_last_of\fP (\fBconst\fP \fBbasic_string\fP &\fB__str\fP, size_type \fB__pos\fP=\fBnpos\fP) \fBconst\fP \fBnoexcept\fP" .br .RI "Find last position of a character of string\&. " .ti -1c .RI "reference \fBfront\fP ()" .br .ti -1c .RI "const_reference \fBfront\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "allocator_type \fBget_allocator\fP () \fBconst\fP \fBnoexcept\fP" .br .RI "Return copy of allocator used to construct this string\&. " .ti -1c .RI "iterator \fBinsert\fP (iterator __p, _CharT __c)" .br .RI "Insert one character\&. " .ti -1c .RI "template<\fBclass\fP \fB_InputIterator\fP > \fBvoid\fP \fBinsert\fP (iterator __p, \fB_InputIterator\fP \fB__beg\fP, \fB_InputIterator\fP __end)" .br .RI "Insert a range of characters\&. " .ti -1c .RI "\fBvoid\fP \fBinsert\fP (iterator __p, \fBinitializer_list\fP< _CharT > \fB__l\fP)" .br .RI "Insert an initializer_list of characters\&. " .ti -1c .RI "\fBvoid\fP \fBinsert\fP (iterator __p, size_type __n, _CharT __c)" .br .RI "Insert multiple characters\&. " .ti -1c .RI "\fBbasic_string\fP & \fBinsert\fP (size_type \fB__pos\fP, \fBconst\fP _CharT *\fB__s\fP)" .br .RI "Insert a C string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBinsert\fP (size_type \fB__pos\fP, \fBconst\fP _CharT *\fB__s\fP, size_type __n)" .br .RI "Insert a C substring\&. " .ti -1c .RI "\fBbasic_string\fP & \fBinsert\fP (size_type \fB__pos\fP, size_type __n, _CharT __c)" .br .RI "Insert multiple characters\&. " .ti -1c .RI "\fBbasic_string\fP & \fBinsert\fP (size_type \fB__pos1\fP, \fBconst\fP \fBbasic_string\fP &\fB__str\fP)" .br .RI "Insert value of a string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBinsert\fP (size_type \fB__pos1\fP, \fBconst\fP \fBbasic_string\fP &\fB__str\fP, size_type \fB__pos2\fP, size_type __n=\fBnpos\fP)" .br .RI "Insert a substring\&. " .ti -1c .RI "size_type \fBlength\fP () \fBconst\fP \fBnoexcept\fP" .br .RI "Returns the number of characters in the string, not including any null-termination\&. " .ti -1c .RI "size_type \fBmax_size\fP () \fBconst\fP \fBnoexcept\fP" .br .RI "Returns the size() of the largest possible string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBoperator+=\fP (_CharT __c)" .br .RI "Append a character\&. " .ti -1c .RI "\fBbasic_string\fP & \fBoperator+=\fP (\fBconst\fP _CharT *\fB__s\fP)" .br .RI "Append a C string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBoperator+=\fP (\fBconst\fP \fBbasic_string\fP &\fB__str\fP)" .br .RI "Append a string to this string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBoperator+=\fP (\fBinitializer_list\fP< _CharT > \fB__l\fP)" .br .RI "Append an initializer_list of characters\&. " .ti -1c .RI "\fBbasic_string\fP & \fBoperator=\fP (_CharT __c)" .br .RI "Set value to string of length 1\&. " .ti -1c .RI "\fBbasic_string\fP & \fBoperator=\fP (\fBbasic_string\fP &&\fB__str\fP) \fBnoexcept\fP(/*\fBconditional\fP */)" .br .RI "Move assign the value of \fIstr\fP to this string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBoperator=\fP (\fBconst\fP _CharT *\fB__s\fP)" .br .RI "Copy contents of \fIs\fP into this string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBoperator=\fP (\fBconst\fP \fBbasic_string\fP &\fB__str\fP)" .br .RI "Assign the value of \fIstr\fP to this string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBoperator=\fP (\fBinitializer_list\fP< _CharT > \fB__l\fP)" .br .RI "Set value to string constructed from initializer list\&. " .ti -1c .RI "reference \fBoperator[]\fP (size_type \fB__pos\fP)" .br .RI "Subscript access to the data contained in the string\&. " .ti -1c .RI "const_reference \fBoperator[]\fP (size_type \fB__pos\fP) \fBconst\fP \fBnoexcept\fP" .br .RI "Subscript access to the data contained in the string\&. " .ti -1c .RI "\fBvoid\fP \fBpop_back\fP ()" .br .RI "Remove the last character\&. " .ti -1c .RI "\fBvoid\fP \fBpush_back\fP (_CharT __c)" .br .RI "Append a single character\&. " .ti -1c .RI "\fBreverse_iterator\fP \fBrbegin\fP ()" .br .ti -1c .RI "\fBconst_reverse_iterator\fP \fBrbegin\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "\fBreverse_iterator\fP \fBrend\fP ()" .br .ti -1c .RI "\fBconst_reverse_iterator\fP \fBrend\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (iterator \fB__i1\fP, iterator \fB__i2\fP, _CharT *\fB__k1\fP, _CharT *\fB__k2\fP)" .br .ti -1c .RI "template<\fBclass\fP \fB_InputIterator\fP > \fBbasic_string\fP & \fBreplace\fP (iterator \fB__i1\fP, iterator \fB__i2\fP, \fB_InputIterator\fP \fB__k1\fP, \fB_InputIterator\fP \fB__k2\fP)" .br .RI "Replace range of characters with range\&. " .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (iterator \fB__i1\fP, iterator \fB__i2\fP, \fBconst\fP _CharT *\fB__k1\fP, \fBconst\fP _CharT *\fB__k2\fP)" .br .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (iterator \fB__i1\fP, iterator \fB__i2\fP, \fBconst\fP _CharT *\fB__s\fP)" .br .RI "Replace range of characters with C string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (iterator \fB__i1\fP, iterator \fB__i2\fP, \fBconst\fP _CharT *\fB__s\fP, size_type __n)" .br .RI "Replace range of characters with C substring\&. " .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (iterator \fB__i1\fP, iterator \fB__i2\fP, \fBconst\fP \fBbasic_string\fP &\fB__str\fP)" .br .RI "Replace range of characters with string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (iterator \fB__i1\fP, iterator \fB__i2\fP, const_iterator \fB__k1\fP, const_iterator \fB__k2\fP)" .br .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (iterator \fB__i1\fP, iterator \fB__i2\fP, \fBinitializer_list\fP< _CharT > \fB__l\fP)" .br .RI "Replace range of characters with initializer_list\&. " .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (iterator \fB__i1\fP, iterator \fB__i2\fP, iterator \fB__k1\fP, iterator \fB__k2\fP)" .br .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (iterator \fB__i1\fP, iterator \fB__i2\fP, size_type __n, _CharT __c)" .br .RI "Replace range of characters with multiple characters\&. " .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (size_type \fB__pos\fP, size_type __n, \fBconst\fP \fBbasic_string\fP &\fB__str\fP)" .br .RI "Replace characters with value from another string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (size_type \fB__pos\fP, size_type \fB__n1\fP, \fBconst\fP _CharT *\fB__s\fP)" .br .RI "Replace characters with value of a C string\&. " .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (size_type \fB__pos\fP, size_type \fB__n1\fP, \fBconst\fP _CharT *\fB__s\fP, size_type \fB__n2\fP)" .br .RI "Replace characters with value of a C substring\&. " .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (size_type \fB__pos\fP, size_type \fB__n1\fP, size_type \fB__n2\fP, _CharT __c)" .br .RI "Replace characters with multiple characters\&. " .ti -1c .RI "\fBbasic_string\fP & \fBreplace\fP (size_type \fB__pos1\fP, size_type \fB__n1\fP, \fBconst\fP \fBbasic_string\fP &\fB__str\fP, size_type \fB__pos2\fP, size_type \fB__n2\fP=\fBnpos\fP)" .br .RI "Replace characters with value from another string\&. " .ti -1c .RI "\fBvoid\fP \fBreserve\fP (size_type \fB__res_arg\fP=0)" .br .RI "Attempt to preallocate enough memory for specified number of characters\&. " .ti -1c .RI "\fBvoid\fP \fBresize\fP (size_type __n)" .br .RI "Resizes the string to the specified number of characters\&. " .ti -1c .RI "\fBvoid\fP \fBresize\fP (size_type __n, _CharT __c)" .br .RI "Resizes the string to the specified number of characters\&. " .ti -1c .RI "size_type \fBrfind\fP (_CharT __c, size_type \fB__pos\fP=\fBnpos\fP) \fBconst\fP \fBnoexcept\fP" .br .RI "Find last position of a character\&. " .ti -1c .RI "size_type \fBrfind\fP (\fBconst\fP _CharT *\fB__s\fP, size_type \fB__pos\fP, size_type __n) \fBconst\fP \fBnoexcept\fP" .br .RI "Find last position of a C substring\&. " .ti -1c .RI "size_type \fBrfind\fP (\fBconst\fP _CharT *\fB__s\fP, size_type \fB__pos\fP=\fBnpos\fP) \fBconst\fP \fBnoexcept\fP" .br .RI "Find last position of a C string\&. " .ti -1c .RI "size_type \fBrfind\fP (\fBconst\fP \fBbasic_string\fP &\fB__str\fP, size_type \fB__pos\fP=\fBnpos\fP) \fBconst\fP \fBnoexcept\fP" .br .RI "Find last position of a string\&. " .ti -1c .RI "\fBvoid\fP \fBshrink_to_fit\fP () \fBnoexcept\fP" .br .RI "A non-binding request to reduce capacity() to size()\&. " .ti -1c .RI "size_type \fBsize\fP () \fBconst\fP \fBnoexcept\fP" .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 \fB__pos\fP=0, size_type __n=\fBnpos\fP) \fBconst\fP" .br .RI "Get a substring\&. " .ti -1c .RI "\fBvoid\fP \fBswap\fP (\fBbasic_string\fP &\fB__s\fP) \fBnoexcept\fP(/*\fBconditional\fP */)" .br .RI "Swap contents with another string\&. " .in -1c .SS "Static Public Attributes" .in +1c .ti -1c .RI "\fBstatic\fP \fBconst\fP size_type \fBnpos\fP" .br .RI "Value returned by various member functions when they fail\&. " .in -1c .SS "Protected Types" .in +1c .ti -1c .RI "\fBtypedef\fP iterator \fB__const_iterator\fP" .br .in -1c .SH "Detailed Description" .PP .SS "template<\fBtypename\fP _CharT, \fBtypename\fP _Traits, \fBtypename\fP _Alloc> .br class std::basic_string< _CharT, _Traits, _Alloc >"Managing sequences of characters and character-like objects\&. .PP \fBTemplate Parameters\fP .RS 4 \fI_CharT\fP Type of character .br \fI_Traits\fP Traits for character type, defaults to char_traits<_CharT>\&. .br \fI_Alloc\fP Allocator type, defaults to allocator<_CharT>\&. .RE .PP Meets the requirements of a \fCcontainer\fP, a \fCreversible container\fP, and a \fCsequence\fP\&. Of the \fCoptional sequence requirements\fP, only \fCpush_back\fP, \fCat\fP, and \fCarray\fP access are supported\&. .PP \fBTodo\fP .RS 4 \\nNeeds documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html .RE .PP .PP Documentation? What's that? Nathan Myers ncm@cantrip.org\&. .PP A string looks like this: .PP .PP .nf [_Rep] _M_length [basic_string] _M_capacity _M_dataplus _M_refcount _M_p \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-> unnamed array of char_type .fi .PP .PP Where the _M_p points to the first character in the string, and you cast it to a pointer-to-_Rep and subtract 1 to get a pointer to the header\&. .PP This approach has the enormous advantage that a string object requires only one allocation\&. All the ugliness is confined within a single pair of inline functions, which each compile to a single \fIadd\fP instruction: _Rep::_M_data(), and string::_M_rep(); and the allocation function which gets a block of raw bytes and with room enough and constructs a _Rep object at the front\&. .PP The reason you want _M_data pointing to the character array and not the _Rep is so that the debugger can see the string contents\&. (Probably we should add a non-inline member to get the _Rep for the debugger to use, so users can check the actual string length\&.) .PP Note that the _Rep object is a POD so that you can have a static \fIempty string\fP _Rep object already \fIconstructed\fP before static constructors have run\&. The reference-count encoding is chosen so that a 0 indicates one reference, so you never try to destroy the empty-string _Rep object\&. .PP All but the last paragraph is considered pretty conventional for a C++ string implementation\&. .PP Definition at line \fB3149\fP of file \fBbasic_string\&.h\fP\&. .SH "Member Typedef Documentation" .PP .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBtypedef\fP iterator \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::__const_iterator\fC [protected]\fP" .PP Definition at line \fB3177\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBtypedef\fP _Alloc \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::allocator_type" .PP Definition at line \fB3157\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBtypedef\fP __gnu_cxx::__normal_iterator \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::const_iterator" .PP Definition at line \fB3171\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBtypedef\fP _CharT_alloc_type::const_pointer \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::const_pointer" .PP Definition at line \fB3168\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBtypedef\fP \fBconst\fP value_type& \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::const_reference" .PP Definition at line \fB3165\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBtypedef\fP \fBstd::reverse_iterator\fP \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::const_reverse_iterator" .PP Definition at line \fB3172\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBtypedef\fP _CharT_alloc_type::difference_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::difference_type" .PP Definition at line \fB3159\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBtypedef\fP __gnu_cxx::__normal_iterator \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::iterator" .PP Definition at line \fB3169\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBtypedef\fP _CharT_alloc_type::pointer \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::pointer" .PP Definition at line \fB3167\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBtypedef\fP value_type& \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::reference" .PP Definition at line \fB3164\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBtypedef\fP \fBstd::reverse_iterator\fP \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::reverse_iterator" .PP Definition at line \fB3173\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBtypedef\fP _CharT_alloc_type::size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::size_type" .PP Definition at line \fB3158\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBtypedef\fP _Traits \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::traits_type" .PP Definition at line \fB3155\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBtypedef\fP _Traits::char_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::value_type" .PP Definition at line \fB3156\fP of file \fBbasic_string\&.h\fP\&. .SH "Constructor & Destructor Documentation" .PP .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::basic_string ()\fC [inline]\fP, \fC [noexcept]\fP" .PP Default constructor creates an empty string\&. .PP Definition at line \fB3553\fP of file \fBbasic_string\&.h\fP\&. .PP Referenced by \fBstd::basic_string< _CharT, _Traits, _Alloc >::substr()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::basic_string (\fBconst\fP _Alloc & __a)\fC [explicit]\fP" .PP Construct an empty string using allocator \fIa\fP\&. .PP Definition at line \fB617\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::basic_string (\fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str)" .PP Construct string with copy of value of \fIstr\fP\&. .PP \fBParameters\fP .RS 4 \fI__str\fP Source string\&. .RE .PP .PP Definition at line \fB609\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::basic_string (\fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str, size_type __pos, \fBconst\fP _Alloc & __a = \fC_Alloc()\fP)" .PP Construct string as copy of a substring\&. .PP \fBParameters\fP .RS 4 \fI__str\fP Source string\&. .br \fI__pos\fP Index of first character to copy from\&. .br \fI__a\fP Allocator to use\&. .RE .PP .PP Definition at line \fB623\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::basic_string (\fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str, size_type __pos, size_type __n)" .PP Construct string as copy of a substring\&. .PP \fBParameters\fP .RS 4 \fI__str\fP Source string\&. .br \fI__pos\fP Index of first character to copy from\&. .br \fI__n\fP Number of characters to copy\&. .RE .PP .PP Definition at line \fB633\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::basic_string (\fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str, size_type __pos, size_type __n, \fBconst\fP _Alloc & __a)" .PP Construct string as copy of a substring\&. .PP \fBParameters\fP .RS 4 \fI__str\fP Source string\&. .br \fI__pos\fP Index of first character to copy from\&. .br \fI__n\fP Number of characters to copy\&. .br \fI__a\fP Allocator to use\&. .RE .PP .PP Definition at line \fB643\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::basic_string (\fBconst\fP _CharT * __s, size_type __n, \fBconst\fP _Alloc & __a = \fC_Alloc()\fP)" .PP Construct string initialized by a character array\&. .PP \fBParameters\fP .RS 4 \fI__s\fP Source character array\&. .br \fI__n\fP Number of characters to copy\&. .br \fI__a\fP Allocator to use (default is default allocator)\&. .RE .PP NB: \fI__s\fP must have at least \fI__n\fP characters, '\\0' has no special meaning\&. .PP Definition at line \fB655\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::basic_string (\fBconst\fP _CharT * __s, \fBconst\fP _Alloc & __a = \fC_Alloc()\fP)" .PP Construct string as copy of a C string\&. .PP \fBParameters\fP .RS 4 \fI__s\fP Source C string\&. .br \fI__a\fP Allocator to use (default is default allocator)\&. .RE .PP .PP Definition at line \fB662\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::basic_string (size_type __n, _CharT __c, \fBconst\fP _Alloc & __a = \fC_Alloc()\fP)" .PP Construct string as multiple characters\&. .PP \fBParameters\fP .RS 4 \fI__n\fP Number of characters\&. .br \fI__c\fP Character to use\&. .br \fI__a\fP Allocator to use (default is default allocator)\&. .RE .PP .PP Definition at line \fB669\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::basic_string (\fBbasic_string\fP< _CharT, _Traits, _Alloc > && __str)\fC [inline]\fP, \fC [noexcept]\fP" .PP Move construct string\&. .PP \fBParameters\fP .RS 4 \fI__str\fP Source string\&. .RE .PP The newly-created string contains the exact contents of \fI__str\fP\&. \fI__str\fP is a valid, but unspecified string\&. .PP Definition at line \fB3637\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::get_allocator()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::basic_string (\fBinitializer_list\fP< _CharT > __l, \fBconst\fP _Alloc & __a = \fC_Alloc()\fP)" .PP Construct string from an initializer list\&. .PP \fBParameters\fP .RS 4 \fI__l\fP std::initializer_list of characters\&. .br \fI__a\fP Allocator to use (default is default allocator)\&. .RE .PP .PP Definition at line \fB684\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::basic_string (\fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str, \fBconst\fP _Alloc & __a)\fC [inline]\fP" .PP Definition at line \fB3657\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::basic_string (\fBbasic_string\fP< _CharT, _Traits, _Alloc > && __str, \fBconst\fP _Alloc & __a)\fC [inline]\fP" .PP Definition at line \fB3661\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > template<\fBtypename\fP \fB_InputIterator\fP > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::basic_string (\fB_InputIterator\fP __beg, \fB_InputIterator\fP __end, \fBconst\fP _Alloc & __a = \fC_Alloc()\fP)" .PP Construct string as copy of a range\&. .PP \fBParameters\fP .RS 4 \fI__beg\fP Start of range\&. .br \fI__end\fP End of range\&. .br \fI__a\fP Allocator to use (default is default allocator)\&. .RE .PP .PP Definition at line \fB677\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::~\fBbasic_string\fP ()\fC [inline]\fP, \fC [noexcept]\fP" .PP Destroy the string instance\&. .PP Definition at line \fB3714\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::get_allocator()\fP\&. .SH "Member Function Documentation" .PP .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > template<\fBtypename\fP \fB_InputIterator\fP > \fBbasic_string\fP< _CharT, _Traits, _Alloc > & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::_M_replace_dispatch (iterator __i1, iterator __i2, \fB_InputIterator\fP __k1, \fB_InputIterator\fP __k2, __false_type)" .PP Definition at line \fB1105\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > template<\fBtypename\fP \fB_InIterator\fP > _CharT * \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::_S_construct (\fB_InIterator\fP __beg, \fB_InIterator\fP __end, \fBconst\fP _Alloc & __a, \fBforward_iterator_tag\fP)" .PP Definition at line \fB563\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > template<\fBclass\fP \fB_InputIterator\fP > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::append (\fB_InputIterator\fP __first, \fB_InputIterator\fP __last)\fC [inline]\fP" .PP Append a range of characters\&. .PP \fBParameters\fP .RS 4 \fI__first\fP Iterator referencing the first character to append\&. .br \fI__last\fP Iterator marking the end of the range\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP Appends characters in the range [__first,__last) to this string\&. .PP Definition at line \fB4287\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::append (\fBconst\fP _CharT * __s)\fC [inline]\fP" .PP Append a C string\&. .PP \fBParameters\fP .RS 4 \fI__s\fP The C string to append\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP .PP Definition at line \fB4249\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::append()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP< _CharT, _Traits, _Alloc > & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::append (\fBconst\fP _CharT * __s, size_type __n)" .PP Append a C substring\&. .PP \fBParameters\fP .RS 4 \fI__s\fP The C string to append\&. .br \fI__n\fP The number of characters to append\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP .PP Definition at line \fB747\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP< _CharT, _Traits, _Alloc > & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::append (\fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str)" .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 \fB774\fP of file \fBbasic_string\&.tcc\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 >::operator+=()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::operator+=()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::operator+=()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \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)" .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 \fB791\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::append (\fBinitializer_list\fP< _CharT > __l)\fC [inline]\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 \fB4273\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::append()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP< _CharT, _Traits, _Alloc > & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::append (size_type __n, _CharT __c)" .PP Append multiple characters\&. .PP \fBParameters\fP .RS 4 \fI__n\fP The number of characters to append\&. .br \fI__c\fP The character to use\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP Appends __n copies of __c to this string\&. .PP Definition at line \fB730\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > template<\fBclass\fP \fB_InputIterator\fP > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::assign (\fB_InputIterator\fP __first, \fB_InputIterator\fP __last)\fC [inline]\fP" .PP Set value to a range of characters\&. .PP \fBParameters\fP .RS 4 \fI__first\fP Iterator referencing the first character to append\&. .br \fI__last\fP Iterator marking the end of the range\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP Sets value of string to characters in the range [__first,__last)\&. .PP Definition at line \fB4434\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::assign (\fBbasic_string\fP< _CharT, _Traits, _Alloc > && __str)\fC [inline]\fP, \fC [noexcept]\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 \fB4355\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::swap()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::assign (\fBconst\fP _CharT * __s)\fC [inline]\fP" .PP Set value to contents of a C string\&. .PP \fBParameters\fP .RS 4 \fI__s\fP The C string to use\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP This function sets the value of this string to the value of \fI__s\fP\&. The data is copied, so there is no dependence on \fI__s\fP once the function returns\&. .PP Definition at line \fB4405\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::assign()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP< _CharT, _Traits, _Alloc > & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::assign (\fBconst\fP _CharT * __s, size_type __n)" .PP Set value to a C substring\&. .PP \fBParameters\fP .RS 4 \fI__s\fP The C string to use\&. .br \fI__n\fP Number of characters to use\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP This function sets the value of this string to the first \fI__n\fP characters of \fI__s\fP\&. If \fI__n\fP is is larger than the number of available characters in \fI__s\fP, the remainder of \fI__s\fP is used\&. .PP Definition at line \fB708\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP< _CharT, _Traits, _Alloc > & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::assign (\fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str)" .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 \fB692\fP of file \fBbasic_string\&.tcc\fP\&. .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 >::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<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \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" .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 \fB4377\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::assign()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::assign (\fBinitializer_list\fP< _CharT > __l)\fC [inline]\fP" .PP Set value to an initializer_list of characters\&. .PP \fBParameters\fP .RS 4 \fI__l\fP The initializer_list of characters to assign\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP .PP Definition at line \fB4444\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::assign()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::assign (size_type __n, _CharT __c)\fC [inline]\fP" .PP Set value to multiple characters\&. .PP \fBParameters\fP .RS 4 \fI__n\fP Length of the resulting string\&. .br \fI__c\fP The character to use\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP This function sets the value of this string to \fI__n\fP copies of character \fI__c\fP\&. .PP Definition at line \fB4421\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::size()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > 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\&. .PP Definition at line \fB4099\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::size()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > 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\&. .PP Definition at line \fB4077\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::size()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > 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 \fB4138\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::empty()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::operator[]()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::size()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > 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\&. .PP Definition at line \fB4149\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::empty()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::operator[]()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::size()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > iterator \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::begin ()\fC [inline]\fP" Returns a read/write iterator that points to the first character in the string\&. Unshares the string\&. .PP Definition at line \fB3800\fP of file \fBbasic_string\&.h\fP\&. .PP Referenced by \fBstd::basic_string< _CharT, _Traits, _Alloc >::crend()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::rend()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::rend()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > const_iterator \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::begin () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) iterator that points to the first character in the string\&. .PP Definition at line \fB3811\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBconst\fP _CharT * \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::c_str () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Return const pointer to null-terminated contents\&. This is a handle to internal data\&. Do not modify or dire things may happen\&. .PP Definition at line \fB5203\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > 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\&. .PP Definition at line \fB3973\fP of file \fBbasic_string\&.h\fP\&. .PP Referenced by \fBstd::basic_string< _CharT, _Traits, _Alloc >::push_back()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::shrink_to_fit()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > const_iterator \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::cbegin () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) iterator that points to the first character in the string\&. .PP Definition at line \fB3875\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > const_iterator \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::cend () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) iterator that points one past the last character in the string\&. .PP Definition at line \fB3883\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::size()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBvoid\fP \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::clear ()\fC [inline]\fP, \fC [noexcept]\fP" Erases the string, making it empty\&. .PP Definition at line \fB4001\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::get_allocator()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > int \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::compare (\fBconst\fP _CharT * __s) const\fC [noexcept]\fP" .PP Compare to a C string\&. .PP \fBParameters\fP .RS 4 \fI__s\fP C 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__s\fP, 0 if their values are equivalent, or > 0 if this string is ordered after \fI__s\fP\&. Determines the effective length rlen of the strings to compare as the smallest of size() and the length of a string constructed from \fI__s\fP\&. The function then compares the two strings by calling traits::compare(data(),s,rlen)\&. If the result of the comparison is nonzero returns it, otherwise the shorter one is ordered first\&. .PP Definition at line \fB1418\fP of file \fBbasic_string\&.tcc\fP\&. .PP References \fBstd::min()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > int \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::compare (\fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str) const\fC [inline]\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 \fB5759\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::min()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::size()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > 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" .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 \fB1385\fP of file \fBbasic_string\&.tcc\fP\&. .PP References \fBstd::min()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > int \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::compare (size_type __pos, size_type __n1, \fBconst\fP _CharT * __s) const" .PP Compare substring to a C string\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP Index of first character of substring\&. .br \fI__n1\fP Number of characters in substring\&. .br \fI__s\fP C 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__n1\fP characters starting at \fIpos\fP\&. Returns an integer < 0 if the substring is ordered before \fI__s\fP, 0 if their values are equivalent, or > 0 if the substring is ordered after \fI__s\fP\&. Determines the effective length rlen of the strings to compare as the smallest of the length of the substring and the length of a string constructed from \fI__s\fP\&. The function then compares the two string by calling traits::compare(substring\&.data(),__s,rlen)\&. If the result of the comparison is nonzero returns it, otherwise the shorter one is ordered first\&. .PP Definition at line \fB1433\fP of file \fBbasic_string\&.tcc\fP\&. .PP References \fBstd::min()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > int \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::compare (size_type __pos, size_type __n1, \fBconst\fP _CharT * __s, size_type __n2) const" .PP Compare substring against a character array\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP Index of first character of substring\&. .br \fI__n1\fP Number of characters in substring\&. .br \fI__s\fP character array to compare against\&. .br \fI__n2\fP Number of characters of s\&. .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__pos\fP\&. Form a string from the first \fI__n2\fP characters of \fI__s\fP\&. Returns an integer < 0 if this substring is ordered before the string from \fI__s\fP, 0 if their values are equivalent, or > 0 if this substring is ordered after the string from \fI__s\fP\&. Determines the effective length rlen of the strings to compare as the smallest of the length of the substring and \fI__n2\fP\&. The function then compares the two strings by calling traits::compare(substring\&.data(),s,rlen)\&. If the result of the comparison is nonzero returns it, otherwise the shorter one is ordered first\&. .PP NB: s must have at least n2 characters, '\\0' has no special meaning\&. .PP Definition at line \fB1449\fP of file \fBbasic_string\&.tcc\fP\&. .PP References \fBstd::min()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > 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" .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 \fB1400\fP of file \fBbasic_string\&.tcc\fP\&. .PP References \fBstd::min()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP< _CharT, _Traits, _Alloc >::size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::copy (_CharT * __s, size_type __n, size_type __pos = \fC0\fP) const" .PP Copy substring into C string\&. .PP \fBParameters\fP .RS 4 \fI__s\fP C string to copy value into\&. .br \fI__n\fP Number of characters to copy\&. .br \fI__pos\fP Index of first character to copy\&. .RE .PP \fBReturns\fP .RS 4 Number of characters actually copied .RE .PP \fBExceptions\fP .RS 4 \fIstd::out_of_range\fP If __pos > size()\&. .RE .PP Copies up to \fI__n\fP characters starting at \fI__pos\fP into the C string \fI__s\fP\&. If \fI__pos\fP is greater than size(), out_of_range is thrown\&. .PP Definition at line \fB1143\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBconst_reverse_iterator\fP \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::crbegin () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) reverse iterator that points to the last character in the string\&. Iteration is done in reverse element order\&. .PP Definition at line \fB3892\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::end()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBconst_reverse_iterator\fP \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::crend () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) reverse iterator that points to one before the first character in the string\&. Iteration is done in reverse element order\&. .PP Definition at line \fB3901\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::begin()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBconst\fP _CharT * \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::data () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Return const pointer to contents\&. This is a pointer to internal data\&. It is undefined to modify the contents through the returned pointer\&. To get a pointer that allows modifying the contents use \fC&str\fP[0] instead, (or in C++17 the non-const \fCstr\&.data()\fP overload)\&. .PP Definition at line \fB5215\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > _GLIBCXX_NODISCARD 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\&. .PP Definition at line \fB4023\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::size()\fP\&. .PP Referenced by \fBstd::basic_string< _CharT, _Traits, _Alloc >::back()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::back()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::front()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::front()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::pop_back()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > iterator \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::end ()\fC [inline]\fP" Returns a read/write iterator that points one past the last character in the string\&. Unshares the string\&. .PP Definition at line \fB3819\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::size()\fP\&. .PP Referenced by \fBstd::basic_string< _CharT, _Traits, _Alloc >::crbegin()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::rbegin()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::rbegin()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > const_iterator \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::end () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) iterator that points one past the last character in the string\&. .PP Definition at line \fB3830\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::size()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP< _CharT, _Traits, _Alloc >::iterator \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::erase (iterator __first, iterator __last)" .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 \fB840\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > iterator \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::erase (iterator __position)\fC [inline]\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 \fB4722\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::erase (size_type __pos = \fC0\fP, size_type __n = \fC\fBnpos\fP\fP)\fC [inline]\fP" .PP Remove characters\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP Index of first character to remove (default 0)\&. .br \fI__n\fP Number of characters to remove (default remainder)\&. .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\&. .RE .PP Removes \fI__n\fP characters from this string starting at \fI__pos\fP\&. The length of the string is reduced by \fI__n\fP\&. If there are < \fI__n\fP characters to remove, the remainder of the string is truncated\&. 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 \fB4706\fP of file \fBbasic_string\&.h\fP\&. .PP Referenced by \fBstd::basic_string< _CharT, _Traits, _Alloc >::pop_back()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP< _CharT, _Traits, _Alloc >::size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find (_CharT __c, size_type __pos = \fC0\fP) const\fC [noexcept]\fP" .PP Find position of a character\&. .PP \fBParameters\fP .RS 4 \fI__c\fP Character 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 \fI__c\fP within this string\&. If found, returns the index where it was found\&. If not found, returns npos\&. .PP Definition at line \fB1224\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP< _CharT, _Traits, _Alloc >::size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find (\fBconst\fP _CharT * __s, size_type __pos, size_type __n) const\fC [noexcept]\fP" .PP Find position of a C substring\&. .PP \fBParameters\fP .RS 4 \fI__s\fP C string to locate\&. .br \fI__pos\fP Index of character to search from\&. .br \fI__n\fP Number of characters from \fIs\fP to search for\&. .RE .PP \fBReturns\fP .RS 4 Index of start of first occurrence\&. .RE .PP Starting from \fI__pos\fP, searches forward for the first \fI__n\fP characters in \fI__s\fP within this string\&. If found, returns the index where it begins\&. If not found, returns npos\&. .PP Definition at line \fB1188\fP of file \fBbasic_string\&.tcc\fP\&. .PP Referenced by \fBstd::basic_string< _CharT, _Traits, _Alloc >::find()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::find()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_first_of()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find (\fBconst\fP _CharT * __s, size_type __pos = \fC0\fP) const\fC [inline]\fP, \fC [noexcept]\fP" .PP Find position of a C string\&. .PP \fBParameters\fP .RS 4 \fI__s\fP C 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 the value of \fI__s\fP within this string\&. If found, returns the index where it begins\&. If not found, returns npos\&. .PP Definition at line \fB5282\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::find()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > 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" .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 \fB5267\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::find()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP< _CharT, _Traits, _Alloc >::size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find_first_not_of (_CharT __c, size_type __pos = \fC0\fP) const\fC [noexcept]\fP" .PP Find position of a different character\&. .PP \fBParameters\fP .RS 4 \fI__c\fP Character 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 other than \fI__c\fP within this string\&. If found, returns the index where it was found\&. If not found, returns npos\&. .PP Definition at line \fB1332\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP< _CharT, _Traits, _Alloc >::size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find_first_not_of (\fBconst\fP _CharT * __s, size_type __pos, size_type __n) const\fC [noexcept]\fP" .PP Find position of a character not in C substring\&. .PP \fBParameters\fP .RS 4 \fI__s\fP C string containing characters to avoid\&. .br \fI__pos\fP Index of character to search from\&. .br \fI__n\fP Number of characters from __s to consider\&. .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 the first \fI__n\fP characters of \fI__s\fP within this string\&. If found, returns the index where it was found\&. If not found, returns npos\&. .PP Definition at line \fB1319\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find_first_not_of (\fBconst\fP _CharT * __s, size_type __pos = \fC0\fP) const\fC [inline]\fP, \fC [noexcept]\fP" .PP Find position of a character not in C string\&. .PP \fBParameters\fP .RS 4 \fI__s\fP C 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__s\fP within this string\&. If found, returns the index where it was found\&. If not found, returns npos\&. .PP Definition at line \fB5606\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_first_not_of()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > 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" .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 \fB5575\fP of file \fBbasic_string\&.h\fP\&. .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, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_first_not_of()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find_first_of (_CharT __c, size_type __pos = \fC0\fP) const\fC [inline]\fP, \fC [noexcept]\fP" .PP Find position of a character\&. .PP \fBParameters\fP .RS 4 \fI__c\fP Character 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 the character \fI__c\fP within this string\&. If found, returns the index where it was found\&. If not found, returns npos\&. .PP Note: equivalent to find(__c, __pos)\&. .PP Definition at line \fB5459\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::find()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP< _CharT, _Traits, _Alloc >::size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find_first_of (\fBconst\fP _CharT * __s, size_type __pos, size_type __n) const\fC [noexcept]\fP" .PP Find position of a character of C substring\&. .PP \fBParameters\fP .RS 4 \fI__s\fP String containing characters to locate\&. .br \fI__pos\fP Index of character to search from\&. .br \fI__n\fP Number of characters from s to search for\&. .RE .PP \fBReturns\fP .RS 4 Index of first occurrence\&. .RE .PP Starting from \fI__pos\fP, searches forward for one of the first \fI__n\fP characters of \fI__s\fP within this string\&. If found, returns the index where it was found\&. If not found, returns npos\&. .PP Definition at line \fB1281\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find_first_of (\fBconst\fP _CharT * __s, size_type __pos = \fC0\fP) const\fC [inline]\fP, \fC [noexcept]\fP" .PP Find position of a character of C string\&. .PP \fBParameters\fP .RS 4 \fI__s\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__s\fP within this string\&. If found, returns the index where it was found\&. If not found, returns npos\&. .PP Definition at line \fB5439\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_first_of()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > 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" .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 \fB5408\fP of file \fBbasic_string\&.h\fP\&. .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, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_first_of()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP< _CharT, _Traits, _Alloc >::size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find_last_not_of (_CharT __c, size_type __pos = \fC\fBnpos\fP\fP) const\fC [noexcept]\fP" .PP Find last position of a different character\&. .PP \fBParameters\fP .RS 4 \fI__c\fP Character 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 other than \fI__c\fP within this string\&. If found, returns the index where it was found\&. If not found, returns npos\&. .PP Definition at line \fB1365\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP< _CharT, _Traits, _Alloc >::size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find_last_not_of (\fBconst\fP _CharT * __s, size_type __pos, size_type __n) const\fC [noexcept]\fP" .PP Find last position of a character not in C substring\&. .PP \fBParameters\fP .RS 4 \fI__s\fP C string containing characters to avoid\&. .br \fI__pos\fP Index of character to search back from\&. .br \fI__n\fP Number of characters from s to consider\&. .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 the first \fI__n\fP characters of \fI__s\fP within this string\&. If found, returns the index where it was found\&. If not found, returns npos\&. .PP Definition at line \fB1343\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find_last_not_of (\fBconst\fP _CharT * __s, size_type __pos = \fC\fBnpos\fP\fP) const\fC [inline]\fP, \fC [noexcept]\fP" .PP Find last position of a character not in C string\&. .PP \fBParameters\fP .RS 4 \fI__s\fP C 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__s\fP within this string\&. If found, returns the index where it was found\&. If not found, returns npos\&. .PP Definition at line \fB5688\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_last_not_of()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > 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" .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 \fB5657\fP of file \fBbasic_string\&.h\fP\&. .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, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_last_not_of()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find_last_of (_CharT __c, size_type __pos = \fC\fBnpos\fP\fP) const\fC [inline]\fP, \fC [noexcept]\fP" .PP Find last position of a character\&. .PP \fBParameters\fP .RS 4 \fI__c\fP Character 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 \fI__c\fP within this string\&. If found, returns the index where it was found\&. If not found, returns npos\&. .PP Note: equivalent to rfind(__c, __pos)\&. .PP Definition at line \fB5543\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::rfind()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP< _CharT, _Traits, _Alloc >::size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find_last_of (\fBconst\fP _CharT * __s, size_type __pos, size_type __n) const\fC [noexcept]\fP" .PP Find last position of a character of C substring\&. .PP \fBParameters\fP .RS 4 \fI__s\fP C string containing characters to locate\&. .br \fI__pos\fP Index of character to search back from\&. .br \fI__n\fP Number of characters from s to search for\&. .RE .PP \fBReturns\fP .RS 4 Index of last occurrence\&. .RE .PP Starting from \fI__pos\fP, searches backward for one of the first \fI__n\fP characters of \fI__s\fP within this string\&. If found, returns the index where it was found\&. If not found, returns npos\&. .PP Definition at line \fB1297\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::find_last_of (\fBconst\fP _CharT * __s, size_type __pos = \fC\fBnpos\fP\fP) const\fC [inline]\fP, \fC [noexcept]\fP" .PP Find last position of a character of C string\&. .PP \fBParameters\fP .RS 4 \fI__s\fP C 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__s\fP within this string\&. If found, returns the index where it was found\&. If not found, returns npos\&. .PP Definition at line \fB5523\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_last_of()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > 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" .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 \fB5492\fP of file \fBbasic_string\&.h\fP\&. .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, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::find_last_of()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > 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 \fB4116\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::empty()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::operator[]()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > 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\&. .PP Definition at line \fB4127\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::empty()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::operator[]()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > 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\&. .PP Definition at line \fB5237\fP of file \fBbasic_string\&.h\fP\&. .PP Referenced by \fBstd::basic_string< _CharT, _Traits, _Alloc >::basic_string()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::~basic_string()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::clear()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > iterator \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::insert (iterator __p, _CharT __c)\fC [inline]\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 \fB4646\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > template<\fBclass\fP \fB_InputIterator\fP > \fBvoid\fP \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::insert (iterator __p, \fB_InputIterator\fP __beg, \fB_InputIterator\fP __end)\fC [inline]\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 \fB4511\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBvoid\fP \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::insert (iterator __p, \fBinitializer_list\fP< _CharT > __l)\fC [inline]\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 \fB4522\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::insert()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBvoid\fP \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::insert (iterator __p, size_type __n, _CharT __c)\fC [inline]\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 \fB4494\fP of file \fBbasic_string\&.h\fP\&. .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, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::insert()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::insert (size_type __pos, \fBconst\fP _CharT * __s)\fC [inline]\fP" .PP Insert a C string\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP Iterator referencing location in string to insert at\&. .br \fI__s\fP The C 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\&. .br \fIstd::out_of_range\fP If \fIpos\fP is beyond the end of this string\&. .RE .PP Inserts the first \fIn\fP characters of \fI__s\fP starting at \fI__pos\fP\&. If adding characters causes the length to exceed max_size(), length_error is thrown\&. If \fI__pos\fP is beyond end(), out_of_range is thrown\&. The value of the string doesn't change if an error is thrown\&. .PP Definition at line \fB4605\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::insert()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP< _CharT, _Traits, _Alloc > & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::insert (size_type __pos, \fBconst\fP _CharT * __s, size_type __n)" .PP Insert a C substring\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP Iterator referencing location in string to insert at\&. .br \fI__s\fP The C string to insert\&. .br \fI__n\fP The 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 \fI__pos\fP is beyond the end of this string\&. .RE .PP Inserts the first \fI__n\fP characters of \fI__s\fP starting at \fI__pos\fP\&. If adding characters causes the length to exceed max_size(), length_error is thrown\&. If \fI__pos\fP is beyond end(), out_of_range is thrown\&. The value of the string doesn't change if an error is thrown\&. .PP Definition at line \fB809\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::insert (size_type __pos, size_type __n, _CharT __c)\fC [inline]\fP" .PP Insert multiple characters\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP Index in string to insert at\&. .br \fI__n\fP Number of characters to insert .br \fI__c\fP The 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\&. .br \fIstd::out_of_range\fP If \fI__pos\fP is beyond the end of this string\&. .RE .PP Inserts \fI__n\fP copies of character \fI__c\fP starting at index \fI__pos\fP\&. If adding characters causes the length to exceed max_size(), length_error is thrown\&. If \fI__pos\fP > length(), out_of_range is thrown\&. The value of the string doesn't change if an error is thrown\&. .PP Definition at line \fB4628\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \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" .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 \fB4542\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::insert()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \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" .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 \fB4564\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::insert()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > 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\&. .PP Definition at line \fB3916\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > 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\&. .PP Definition at line \fB3921\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::operator+= (_CharT __c)\fC [inline]\fP" .PP Append a character\&. .PP \fBParameters\fP .RS 4 \fI__c\fP The character to append\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP .PP Definition at line \fB4181\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::push_back()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::operator+= (\fBconst\fP _CharT * __s)\fC [inline]\fP" .PP Append a C string\&. .PP \fBParameters\fP .RS 4 \fI__s\fP The C string to append\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP .PP Definition at line \fB4172\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::append()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::operator+= (\fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str)\fC [inline]\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 \fB4163\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::append()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::operator+= (\fBinitializer_list\fP< _CharT > __l)\fC [inline]\fP" .PP Append an initializer_list of characters\&. .PP \fBParameters\fP .RS 4 \fI__l\fP The initializer_list of characters to be appended\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP .PP Definition at line \fB4194\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::append()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::operator= (_CharT __c)\fC [inline]\fP" .PP Set value to string of length 1\&. .PP \fBParameters\fP .RS 4 \fI__c\fP Source character\&. .RE .PP Assigning to a character makes this string length 1 and (*this)[0] == \fIc\fP\&. .PP Definition at line \fB3741\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::assign()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::operator= (\fBbasic_string\fP< _CharT, _Traits, _Alloc > && __str)\fC [inline]\fP, \fC [noexcept]\fP" .PP Move assign the value of \fIstr\fP to this string\&. .PP \fBParameters\fP .RS 4 \fI__str\fP Source string\&. .RE .PP The contents of \fIstr\fP are moved into this string (without copying)\&. \fIstr\fP is a valid, but unspecified string\&. .PP Definition at line \fB3756\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::swap()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::operator= (\fBconst\fP _CharT * __s)\fC [inline]\fP" .PP Copy contents of \fIs\fP into this string\&. .PP \fBParameters\fP .RS 4 \fI__s\fP Source null-terminated string\&. .RE .PP .PP Definition at line \fB3730\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::assign()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::operator= (\fBconst\fP \fBbasic_string\fP< _CharT, _Traits, _Alloc > & __str)\fC [inline]\fP" .PP Assign the value of \fIstr\fP to this string\&. .PP \fBParameters\fP .RS 4 \fI__str\fP Source string\&. .RE .PP .PP Definition at line \fB3722\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::assign()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::operator= (\fBinitializer_list\fP< _CharT > __l)\fC [inline]\fP" .PP Set value to string constructed from initializer list\&. .PP \fBParameters\fP .RS 4 \fI__l\fP std::initializer_list\&. .RE .PP .PP Definition at line \fB3769\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::assign()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > reference \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::operator[] (size_type __pos)\fC [inline]\fP" .PP Subscript access to the data contained in the string\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP The index of the character to access\&. .RE .PP \fBReturns\fP .RS 4 Read/write reference to the character\&. .RE .PP This operator allows for easy, array-style, data access\&. Note that data access with this operator is unchecked and out_of_range lookups are not defined\&. (For checked lookups see at()\&.) Unshares the string\&. .PP Definition at line \fB4055\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::size()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > const_reference \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::operator[] (size_type __pos) const\fC [inline]\fP, \fC [noexcept]\fP" .PP Subscript access to the data contained in the string\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP The index of the character to access\&. .RE .PP \fBReturns\fP .RS 4 Read-only (constant) reference to the character\&. .RE .PP This operator allows for easy, array-style, data access\&. Note that data access with this operator is unchecked and out_of_range lookups are not defined\&. (For checked lookups see at()\&.) .PP Definition at line \fB4038\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::size()\fP\&. .PP Referenced by \fBstd::basic_string< _CharT, _Traits, _Alloc >::back()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::back()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::front()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::front()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBvoid\fP \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::pop_back ()\fC [inline]\fP" .PP Remove the last character\&. The string must be non-empty\&. .PP Definition at line \fB4751\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::empty()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::erase()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::size()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBvoid\fP \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::push_back (_CharT __c)\fC [inline]\fP" .PP Append a single character\&. .PP \fBParameters\fP .RS 4 \fI__c\fP Character to append\&. .RE .PP .PP Definition at line \fB4328\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::capacity()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::reserve()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::size()\fP\&. .PP Referenced by \fBstd::basic_string< _CharT, _Traits, _Alloc >::operator+=()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBreverse_iterator\fP \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::rbegin ()\fC [inline]\fP" Returns a read/write reverse iterator that points to the last character in the string\&. Iteration is done in reverse element order\&. Unshares the string\&. .PP Definition at line \fB3839\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::end()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBconst_reverse_iterator\fP \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::rbegin () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) reverse iterator that points to the last character in the string\&. Iteration is done in reverse element order\&. .PP Definition at line \fB3848\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::end()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBreverse_iterator\fP \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::rend ()\fC [inline]\fP" Returns a read/write reverse iterator that points to one before the first character in the string\&. Iteration is done in reverse element order\&. Unshares the string\&. .PP Definition at line \fB3857\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::begin()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBconst_reverse_iterator\fP \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::rend () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) reverse iterator that points to one before the first character in the string\&. Iteration is done in reverse element order\&. .PP Definition at line \fB3866\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::begin()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::replace (iterator __i1, iterator __i2, _CharT * __k1, _CharT * __k2)\fC [inline]\fP" .PP Definition at line \fB4983\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > template<\fBclass\fP \fB_InputIterator\fP > \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" .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 \fB4970\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::replace (iterator __i1, iterator __i2, \fBconst\fP _CharT * __k1, \fBconst\fP _CharT * __k2)\fC [inline]\fP" .PP Definition at line \fB4993\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::replace (iterator __i1, iterator __i2, \fBconst\fP _CharT * __s)\fC [inline]\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 \fB4925\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \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" .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 \fB4904\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \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" .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 \fB4885\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::replace (iterator __i1, iterator __i2, const_iterator __k1, const_iterator __k2)\fC [inline]\fP" .PP Definition at line \fB5014\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::replace (iterator __i1, iterator __i2, \fBinitializer_list\fP< _CharT > __l)\fC [inline]\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 \fB5039\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::replace (iterator __i1, iterator __i2, iterator __k1, iterator __k2)\fC [inline]\fP" .PP Definition at line \fB5004\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::replace (iterator __i1, iterator __i2, size_type __n, _CharT __c)\fC [inline]\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 \fB4946\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \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" .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 \fB4776\fP of file \fBbasic_string\&.h\fP\&. .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 >::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<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::replace (size_type __pos, size_type __n1, \fBconst\fP _CharT * __s)\fC [inline]\fP" .PP Replace characters with value of a C string\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP Index of first character to replace\&. .br \fI__n1\fP Number of characters to be replaced\&. .br \fI__s\fP C 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 > size()\&. .br \fIstd::length_error\fP If new length exceeds \fCmax_size()\fP\&. .RE .PP Removes the characters in the range [__pos,__pos + __n1) from this string\&. In place, the characters of \fI__s\fP are inserted\&. If \fI__pos\fP is beyond end of string, out_of_range is thrown\&. 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 \fB4843\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP< _CharT, _Traits, _Alloc > & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::replace (size_type __pos, size_type __n1, \fBconst\fP _CharT * __s, size_type __n2)" .PP Replace characters with value of a C substring\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP Index of first character to replace\&. .br \fI__n1\fP Number of characters to be replaced\&. .br \fI__s\fP C string to insert\&. .br \fI__n2\fP Number of characters from \fIs\fP to use\&. .RE .PP \fBReturns\fP .RS 4 Reference to this string\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::out_of_range\fP If \fIpos1\fP > size()\&. .br \fIstd::length_error\fP If new length exceeds \fCmax_size()\fP\&. .RE .PP Removes the characters in the range [__pos,__pos + __n1) from this string\&. In place, the first \fI__n2\fP characters of \fI__s\fP are inserted, or all of \fI__s\fP if \fI__n2\fP is too large\&. If \fI__pos\fP is beyond end of string, out_of_range is thrown\&. 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 \fB863\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP & \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::replace (size_type __pos, size_type __n1, size_type __n2, _CharT __c)\fC [inline]\fP" .PP Replace characters with multiple characters\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP Index of first character to replace\&. .br \fI__n1\fP Number of characters to be replaced\&. .br \fI__n2\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::out_of_range\fP If \fI__pos\fP > size()\&. .br \fIstd::length_error\fP If new length exceeds \fCmax_size()\fP\&. .RE .PP Removes the characters in the range [pos,pos + n1) from this string\&. In place, \fI__n2\fP copies of \fI__c\fP are inserted\&. If \fI__pos\fP is beyond end of string, out_of_range is thrown\&. 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 \fB4867\fP of file \fBbasic_string\&.h\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \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" .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 \fB4798\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::replace()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBvoid\fP \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::reserve (size_type __res_arg = \fC0\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 \fB951\fP of file \fBbasic_string\&.tcc\fP\&. .PP Referenced by \fBstd::basic_string< _CharT, _Traits, _Alloc >::push_back()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::shrink_to_fit()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBvoid\fP \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::resize (size_type __n)\fC [inline]\fP" .PP Resizes the string to the specified number of characters\&. .PP \fBParameters\fP .RS 4 \fI__n\fP Number of characters the string should contain\&. .RE .PP This function will resize the string to the specified length\&. If the new size is smaller than the string's current size the string is truncated, otherwise the string is extended and new characters are default-constructed\&. For basic types such as char, this means setting them to 0\&. .PP Definition at line \fB3948\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::resize()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBvoid\fP \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::resize (size_type __n, _CharT __c)" .PP Resizes the string to the specified number of characters\&. .PP \fBParameters\fP .RS 4 \fI__n\fP Number of characters the string should contain\&. .br \fI__c\fP Character to fill any new elements\&. .RE .PP This function will resize the string to the specified number of characters\&. If the number is smaller than the string's current size the string is truncated, otherwise the string is extended and new elements are set to \fI__c\fP\&. .PP Definition at line \fB1090\fP of file \fBbasic_string\&.tcc\fP\&. .PP Referenced by \fBstd::money_get< _CharT, _InIter >::do_get()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::resize()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP< _CharT, _Traits, _Alloc >::size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::rfind (_CharT __c, size_type __pos = \fC\fBnpos\fP\fP) const\fC [noexcept]\fP" .PP Find last position of a character\&. .PP \fBParameters\fP .RS 4 \fI__c\fP Character 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 \fI__c\fP within this string\&. If found, returns the index where it was found\&. If not found, returns npos\&. .PP Definition at line \fB1264\fP of file \fBbasic_string\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP< _CharT, _Traits, _Alloc >::size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::rfind (\fBconst\fP _CharT * __s, size_type __pos, size_type __n) const\fC [noexcept]\fP" .PP Find last position of a C substring\&. .PP \fBParameters\fP .RS 4 \fI__s\fP C string to locate\&. .br \fI__pos\fP Index of character to search back from\&. .br \fI__n\fP Number of characters from s to search for\&. .RE .PP \fBReturns\fP .RS 4 Index of start of last occurrence\&. .RE .PP Starting from \fI__pos\fP, searches backward for the first \fI__n\fP characters in \fI__s\fP within this string\&. If found, returns the index where it begins\&. If not found, returns npos\&. .PP Definition at line \fB1242\fP of file \fBbasic_string\&.tcc\fP\&. .PP References \fBstd::min()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > size_type \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::rfind (\fBconst\fP _CharT * __s, size_type __pos = \fC\fBnpos\fP\fP) const\fC [inline]\fP, \fC [noexcept]\fP" .PP Find last position of a C string\&. .PP \fBParameters\fP .RS 4 \fI__s\fP C string to locate\&. .br \fI__pos\fP Index of character to start search at (default end)\&. .RE .PP \fBReturns\fP .RS 4 Index of start of last occurrence\&. .RE .PP Starting from \fI__pos\fP, searches backward for the value of \fI__s\fP within this string\&. If found, returns the index where it begins\&. If not found, returns npos\&. .PP Definition at line \fB5360\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::rfind()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > 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" .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 \fB5329\fP of file \fBbasic_string\&.h\fP\&. .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, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::rfind()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBvoid\fP \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::shrink_to_fit ()\fC [inline]\fP, \fC [noexcept]\fP" .PP A non-binding request to reduce capacity() to size()\&. .PP Definition at line \fB3954\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::capacity()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::reserve()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::size()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > 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\&. .PP Definition at line \fB3910\fP of file \fBbasic_string\&.h\fP\&. .PP Referenced by \fBstd::basic_string< _CharT, _Traits, _Alloc >::assign()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::at()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::at()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::back()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::back()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::cend()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::compare()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::empty()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::end()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::end()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::operator[]()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::operator[]()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::pop_back()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::push_back()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::shrink_to_fit()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBbasic_string\fP \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::substr (size_type __pos = \fC0\fP, size_type __n = \fC\fBnpos\fP\fP) const\fC [inline]\fP" .PP Get a substring\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP Index of first character (default 0)\&. .br \fI__n\fP Number of characters in substring (default remainder)\&. .RE .PP \fBReturns\fP .RS 4 The new string\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::out_of_range\fP If __pos > size()\&. .RE .PP Construct and return a new string using the \fI__n\fP characters starting at \fI__pos\fP\&. If the string is too short, use the remainder of the characters\&. If \fI__pos\fP is beyond the end of the string, out_of_range is thrown\&. .PP Definition at line \fB5740\fP of file \fBbasic_string\&.h\fP\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::basic_string()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBvoid\fP \fBstd::basic_string\fP< _CharT, _Traits, _Alloc >::swap (\fBbasic_string\fP< _CharT, _Traits, _Alloc > & __s)\fC [noexcept]\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 \fB968\fP of file \fBbasic_string\&.tcc\fP\&. .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<\fBtypename\fP _CharT , \fBtypename\fP _Traits , \fBtypename\fP _Alloc > \fBconst\fP \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 \fB3360\fP of file \fBbasic_string\&.h\fP\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.