29 #ifndef _GLIBCXX_DEBUG_STRING
30 #define _GLIBCXX_DEBUG_STRING 1
32 #pragma GCC system_header
39 #define _GLIBCXX_DEBUG_VERIFY_STR_COND_AT(_Cond,_File,_Line,_Func) \
41 __gnu_debug::_Error_formatter::_S_at(_File, _Line, _Func) \
42 ._M_message(#_Cond)._M_error()
44 #if _GLIBCXX_USE_CXX11_ABI && __cplusplus >= 201103
45 # define _GLIBCXX_INSERT_RETURNS_ITERATOR 1
46 # define _GLIBCXX_INSERT_RETURNS_ITERATOR_ONLY(expr) expr
48 # define _GLIBCXX_INSERT_RETURNS_ITERATOR 0
49 # define _GLIBCXX_INSERT_RETURNS_ITERATOR_ONLY(expr)
55 template<
typename _CharT,
typename _Integer>
58 _Integer __n __attribute__((__unused__)),
59 const char* __file __attribute__((__unused__)),
60 unsigned int __line __attribute__((__unused__)),
61 const char* __function __attribute__((__unused__)))
63 #ifdef _GLIBCXX_DEBUG_PEDANTIC
64 _GLIBCXX_DEBUG_VERIFY_STR_COND_AT(__s != 0 || __n == 0,
65 __file, __line, __function);
71 template<
typename _CharT>
74 const char* __file __attribute__((__unused__)),
75 unsigned int __line __attribute__((__unused__)),
76 const char* __function __attribute__((__unused__)))
78 #ifdef _GLIBCXX_DEBUG_PEDANTIC
79 _GLIBCXX_DEBUG_VERIFY_STR_COND_AT(__s != 0,
80 __file, __line, __function);
85 #define __glibcxx_check_string_n_constructor(_Str, _Size) \
86 __check_string(_Str, _Size, __FILE__, __LINE__, __PRETTY_FUNCTION__)
88 #define __glibcxx_check_string_constructor(_Str) \
89 __check_string(_Str, __FILE__, __LINE__, __PRETTY_FUNCTION__)
92 template<
typename _CharT,
typename _Traits = std::
char_traits<_CharT>,
93 typename _Allocator = std::allocator<_CharT> >
96 basic_string<_CharT, _Traits, _Allocator>,
97 _Allocator, _Safe_sequence, bool(_GLIBCXX_USE_CXX11_ABI)>,
105 template<
typename _ItT,
typename _SeqT,
typename _CatT>
106 friend class ::__gnu_debug::_Safe_iterator;
114 typedef _Traits traits_type;
115 typedef typename _Traits::char_type value_type;
116 typedef _Allocator allocator_type;
117 typedef typename _Base::size_type size_type;
118 typedef typename _Base::difference_type difference_type;
119 typedef typename _Base::reference reference;
120 typedef typename _Base::const_reference const_reference;
121 typedef typename _Base::pointer pointer;
122 typedef typename _Base::const_pointer const_pointer;
140 #if __cplusplus < 201103L
153 const _Allocator& __a = _Allocator())
158 :
_Base(__s, __a) { }
182 const _Allocator& __a = _Allocator())
183 :
_Base(__str, __pos, __n, __a) { }
186 const _Allocator& __a = _Allocator())
187 :
_Base(__glibcxx_check_string_n_constructor(__s, __n), __n, __a) { }
189 basic_string(
const _CharT* __s,
const _Allocator& __a = _Allocator())
190 :
_Base(__glibcxx_check_string_constructor(__s), __a)
194 const _Allocator& __a = _Allocator())
195 :
_Base(__n, __c, __a) { }
197 template<
typename _InputIterator>
198 basic_string(_InputIterator __begin, _InputIterator __end,
199 const _Allocator& __a = _Allocator())
201 __glibcxx_check_valid_constructor_range(__begin, __end)),
204 #if __cplusplus < 201103L
208 this->_M_safe() = __str;
221 operator=(
const _CharT* __s)
223 __glibcxx_check_string(__s);
230 operator=(_CharT __c)
237 #if __cplusplus >= 201103L
253 begin()
const _GLIBCXX_NOEXCEPT
261 end()
const _GLIBCXX_NOEXCEPT
269 rbegin()
const _GLIBCXX_NOEXCEPT
277 rend()
const _GLIBCXX_NOEXCEPT
280 #if __cplusplus >= 201103L
282 cbegin()
const noexcept
286 cend()
const noexcept
290 crbegin()
const noexcept
294 crend()
const noexcept
301 using _Base::max_size;
304 resize(size_type __n, _CharT __c)
311 resize(size_type __n)
312 { this->resize(__n, _CharT()); }
314 #if __cplusplus >= 201103L
316 shrink_to_fit() noexcept
345 operator[](size_type __pos)
const _GLIBCXX_NOEXCEPT
347 _GLIBCXX_DEBUG_VERIFY(__pos <= this->
size(),
348 _M_message(__gnu_debug::__msg_subscript_oob)
349 ._M_sequence(*
this,
"this")
350 ._M_integer(__pos,
"__pos")
351 ._M_integer(this->
size(),
"size"));
352 return _M_base()[__pos];
356 operator[](size_type __pos)
358 #if __cplusplus < 201103L && defined(_GLIBCXX_DEBUG_PEDANTIC)
359 __glibcxx_check_subscript(__pos);
362 _GLIBCXX_DEBUG_VERIFY(__pos <= this->
size(),
363 _M_message(__gnu_debug::__msg_subscript_oob)
364 ._M_sequence(*
this,
"this")
365 ._M_integer(__pos,
"__pos")
366 ._M_integer(this->
size(),
"size"));
368 return _M_base()[__pos];
373 #if __cplusplus >= 201103L
388 operator+=(
const _CharT* __s)
390 __glibcxx_check_string(__s);
397 operator+=(_CharT __c)
404 #if __cplusplus >= 201103L
423 append(
const basic_string& __str, size_type __pos, size_type __n)
431 append(
const _CharT* __s, size_type __n)
433 __glibcxx_check_string_len(__s, __n);
440 append(
const _CharT* __s)
442 __glibcxx_check_string(__s);
449 append(size_type __n, _CharT __c)
456 template<
typename _InputIterator>
458 append(_InputIterator __first, _InputIterator __last)
461 __glibcxx_check_valid_range2(__first, __last, __dist);
463 if (__dist.
second >= __dp_sign)
465 __gnu_debug::__unsafe(__last));
476 push_back(_CharT __c)
490 #if __cplusplus >= 201103L
493 noexcept(noexcept(std::declval<_Base&>().assign(
std::move(__x))))
502 assign(
const basic_string& __str, size_type __pos, size_type __n)
510 assign(
const _CharT* __s, size_type __n)
512 __glibcxx_check_string_len(__s, __n);
519 assign(
const _CharT* __s)
521 __glibcxx_check_string(__s);
528 assign(size_type __n, _CharT __c)
535 template<
typename _InputIterator>
537 assign(_InputIterator __first, _InputIterator __last)
540 __glibcxx_check_valid_range2(__first, __last, __dist);
542 if (__dist.
second >= __dp_sign)
544 __gnu_debug::__unsafe(__last));
552 #if __cplusplus >= 201103L
572 size_type __pos2, size_type __n)
580 insert(size_type __pos,
const _CharT* __s, size_type __n)
582 __glibcxx_check_string(__s);
589 insert(size_type __pos,
const _CharT* __s)
591 __glibcxx_check_string(__s);
598 insert(size_type __pos, size_type __n, _CharT __c)
614 #if __cplusplus >= 201103L
619 #if _GLIBCXX_USE_CXX11_ABI
624 typename _Base::iterator __res =
_Base::begin() + __offset;
631 insert(
iterator __p, size_type __n, _CharT __c)
639 template<
typename _InputIterator>
642 _InputIterator __first, _InputIterator __last)
647 typename _Base::iterator __res;
648 #if ! _GLIBCXX_INSERT_RETURNS_ITERATOR
651 if (__dist.
second >= __dp_sign)
653 _GLIBCXX_INSERT_RETURNS_ITERATOR_ONLY(__res =)
655 __gnu_debug::__unsafe(__last));
659 _GLIBCXX_INSERT_RETURNS_ITERATOR_ONLY(__res =)
663 #if ! _GLIBCXX_INSERT_RETURNS_ITERATOR
670 #if __cplusplus >= 201103L
675 #if _GLIBCXX_USE_CXX11_ABI
688 erase(size_type __pos = 0, size_type __n =
_Base::npos)
716 #if __cplusplus >= 201103L
720 __glibcxx_check_nonempty();
727 replace(size_type __pos1, size_type __n1,
const basic_string& __str)
735 replace(size_type __pos1, size_type __n1,
const basic_string& __str,
736 size_type __pos2, size_type __n2)
744 replace(size_type __pos, size_type __n1,
const _CharT* __s,
747 __glibcxx_check_string_len(__s, __n2);
754 replace(size_type __pos, size_type __n1,
const _CharT* __s)
756 __glibcxx_check_string(__s);
763 replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
782 const _CharT* __s, size_type __n)
785 __glibcxx_check_string_len(__s, __n);
796 __glibcxx_check_string(__s);
804 size_type __n, _CharT __c)
812 template<
typename _InputIterator>
815 _InputIterator __j1, _InputIterator __j2)
820 __glibcxx_check_valid_range2(__j1, __j2, __dist);
822 if (__dist.
second >= __dp_sign)
824 __gnu_debug::__unsafe(__j1),
825 __gnu_debug::__unsafe(__j2));
833 #if __cplusplus >= 201103L
846 copy(_CharT* __s, size_type __n, size_type __pos = 0)
const
848 __glibcxx_check_string_len(__s, __n);
854 _GLIBCXX_NOEXCEPT_IF(std::__is_nothrow_swappable<_Base>::value)
862 c_str()
const _GLIBCXX_NOEXCEPT
870 data()
const _GLIBCXX_NOEXCEPT
880 find(
const basic_string& __str, size_type __pos = 0)
const
885 find(
const _CharT* __s, size_type __pos, size_type __n)
const
887 __glibcxx_check_string(__s);
892 find(
const _CharT* __s, size_type __pos = 0)
const
894 __glibcxx_check_string(__s);
899 find(_CharT __c, size_type __pos = 0)
const _GLIBCXX_NOEXCEPT
908 rfind(
const _CharT* __s, size_type __pos, size_type __n)
const
910 __glibcxx_check_string_len(__s, __n);
915 rfind(
const _CharT* __s, size_type __pos =
_Base::npos)
const
917 __glibcxx_check_string(__s);
922 rfind(_CharT __c, size_type __pos =
_Base::npos)
const _GLIBCXX_NOEXCEPT
926 find_first_of(
const basic_string& __str, size_type __pos = 0)
const
931 find_first_of(
const _CharT* __s, size_type __pos, size_type __n)
const
933 __glibcxx_check_string(__s);
938 find_first_of(
const _CharT* __s, size_type __pos = 0)
const
940 __glibcxx_check_string(__s);
945 find_first_of(_CharT __c, size_type __pos = 0)
const _GLIBCXX_NOEXCEPT
950 size_type __pos =
_Base::npos)
const _GLIBCXX_NOEXCEPT
954 find_last_of(
const _CharT* __s, size_type __pos, size_type __n)
const
956 __glibcxx_check_string(__s);
961 find_last_of(
const _CharT* __s, size_type __pos =
_Base::npos)
const
963 __glibcxx_check_string(__s);
968 find_last_of(_CharT __c, size_type __pos =
_Base::npos)
const
973 find_first_not_of(
const basic_string& __str, size_type __pos = 0)
const
978 find_first_not_of(
const _CharT* __s, size_type __pos, size_type __n)
const
980 __glibcxx_check_string_len(__s, __n);
985 find_first_not_of(
const _CharT* __s, size_type __pos = 0)
const
987 __glibcxx_check_string(__s);
992 find_first_not_of(_CharT __c, size_type __pos = 0)
const _GLIBCXX_NOEXCEPT
1002 find_last_not_of(
const _CharT* __s, size_type __pos, size_type __n)
const
1004 __glibcxx_check_string(__s);
1009 find_last_not_of(
const _CharT* __s, size_type __pos =
_Base::npos)
const
1011 __glibcxx_check_string(__s);
1016 find_last_not_of(_CharT __c, size_type __pos =
_Base::npos)
const
1021 substr(size_type __pos = 0, size_type __n =
_Base::npos)
const
1029 compare(size_type __pos1, size_type __n1,
1034 compare(size_type __pos1, size_type __n1,
const basic_string& __str,
1035 size_type __pos2, size_type __n2)
const
1039 compare(
const _CharT* __s)
const
1041 __glibcxx_check_string(__s);
1048 compare(size_type __pos1, size_type __n1,
const _CharT* __s)
const
1050 __glibcxx_check_string(__s);
1057 compare(size_type __pos1, size_type __n1,
const _CharT* __s,
1058 size_type __n2)
const
1060 __glibcxx_check_string_len(__s, __n2);
1065 _M_base() _GLIBCXX_NOEXCEPT {
return *
this; }
1068 _M_base()
const _GLIBCXX_NOEXCEPT {
return *
this; }
1070 using _Safe::_M_invalidate_all;
1073 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1079 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1080 inline basic_string<_CharT,_Traits,_Allocator>
1081 operator+(
const _CharT* __lhs,
1082 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1084 __glibcxx_check_string(__lhs);
1085 return basic_string<_CharT,_Traits,_Allocator>(__lhs) += __rhs;
1088 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1089 inline basic_string<_CharT,_Traits,_Allocator>
1091 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1092 {
return basic_string<_CharT,_Traits,_Allocator>(1, __lhs) += __rhs; }
1094 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1095 inline basic_string<_CharT,_Traits,_Allocator>
1096 operator+(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1097 const _CharT* __rhs)
1099 __glibcxx_check_string(__rhs);
1100 return basic_string<_CharT,_Traits,_Allocator>(__lhs) += __rhs;
1103 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1104 inline basic_string<_CharT,_Traits,_Allocator>
1105 operator+(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1107 {
return basic_string<_CharT,_Traits,_Allocator>(__lhs) += __rhs; }
1109 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1111 operator==(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1112 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1113 {
return __lhs._M_base() == __rhs._M_base(); }
1115 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1117 operator==(
const _CharT* __lhs,
1118 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1120 __glibcxx_check_string(__lhs);
1121 return __lhs == __rhs._M_base();
1124 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1126 operator==(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1127 const _CharT* __rhs)
1129 __glibcxx_check_string(__rhs);
1130 return __lhs._M_base() == __rhs;
1133 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1135 operator!=(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1136 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1137 {
return __lhs._M_base() != __rhs._M_base(); }
1139 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1141 operator!=(
const _CharT* __lhs,
1142 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1144 __glibcxx_check_string(__lhs);
1145 return __lhs != __rhs._M_base();
1148 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1150 operator!=(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1151 const _CharT* __rhs)
1153 __glibcxx_check_string(__rhs);
1154 return __lhs._M_base() != __rhs;
1157 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1159 operator<(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1160 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1161 {
return __lhs._M_base() < __rhs._M_base(); }
1163 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1165 operator<(
const _CharT* __lhs,
1166 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1168 __glibcxx_check_string(__lhs);
1169 return __lhs < __rhs._M_base();
1172 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1174 operator<(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1175 const _CharT* __rhs)
1177 __glibcxx_check_string(__rhs);
1178 return __lhs._M_base() < __rhs;
1181 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1183 operator<=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1184 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1185 {
return __lhs._M_base() <= __rhs._M_base(); }
1187 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1189 operator<=(
const _CharT* __lhs,
1190 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1192 __glibcxx_check_string(__lhs);
1193 return __lhs <= __rhs._M_base();
1196 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1198 operator<=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1199 const _CharT* __rhs)
1201 __glibcxx_check_string(__rhs);
1202 return __lhs._M_base() <= __rhs;
1205 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1207 operator>=(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1208 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1209 {
return __lhs._M_base() >= __rhs._M_base(); }
1211 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1213 operator>=(
const _CharT* __lhs,
1214 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1216 __glibcxx_check_string(__lhs);
1217 return __lhs >= __rhs._M_base();
1220 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1222 operator>=(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1223 const _CharT* __rhs)
1225 __glibcxx_check_string(__rhs);
1226 return __lhs._M_base() >= __rhs;
1229 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1231 operator>(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1232 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1233 {
return __lhs._M_base() > __rhs._M_base(); }
1235 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1237 operator>(
const _CharT* __lhs,
1238 const basic_string<_CharT,_Traits,_Allocator>& __rhs)
1240 __glibcxx_check_string(__lhs);
1241 return __lhs > __rhs._M_base();
1244 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1246 operator>(
const basic_string<_CharT,_Traits,_Allocator>& __lhs,
1247 const _CharT* __rhs)
1249 __glibcxx_check_string(__rhs);
1250 return __lhs._M_base() > __rhs;
1254 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1256 swap(basic_string<_CharT,_Traits,_Allocator>& __lhs,
1257 basic_string<_CharT,_Traits,_Allocator>& __rhs)
1258 { __lhs.swap(__rhs); }
1260 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1262 operator<<(std::basic_ostream<_CharT, _Traits>& __os,
1263 const basic_string<_CharT, _Traits, _Allocator>& __str)
1264 {
return __os << __str._M_base(); }
1266 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1269 basic_string<_CharT,_Traits,_Allocator>& __str)
1272 __str._M_invalidate_all();
1276 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1279 basic_string<_CharT,_Traits,_Allocator>& __str, _CharT __delim)
1284 __str._M_invalidate_all();
1288 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1291 basic_string<_CharT,_Traits,_Allocator>& __str)
1295 __str._M_invalidate_all();
1299 typedef basic_string<char>
string;
1301 #ifdef _GLIBCXX_USE_WCHAR_T
1302 typedef basic_string<wchar_t>
wstring;
1305 #ifdef _GLIBCXX_USE_CHAR8_T
1307 typedef basic_string<char8_t> u8string;
1310 #if __cplusplus >= 201103L
1318 template<
typename _CharT,
typename _Traits,
typename _Allocator>
1319 struct _Insert_range_from_self_is_safe<
1320 __gnu_debug::
basic_string<_CharT, _Traits, _Allocator> >
1321 {
enum { __value = 1 }; };
1325 #if __cplusplus >= 201103L
1326 namespace std _GLIBCXX_VISIBILITY(default)
1328 _GLIBCXX_BEGIN_NAMESPACE_VERSION
1331 template<
typename _CharT>
1333 :
public hash<std::basic_string<_CharT>>
1336 template<
typename _CharT>
1338 : __is_fast_hash<hash<std::basic_string<_CharT>>>
1341 _GLIBCXX_END_NAMESPACE_VERSION
1345 #undef _GLIBCXX_INSERT_RETURNS_ITERATOR
1346 #undef _GLIBCXX_INSERT_RETURNS_ITERATOR_ONLY
constexpr auto cbegin(const _Container &__cont) noexcept(noexcept(std::begin(__cont))) -> decltype(std::begin(__cont))
Return an iterator pointing to the first element of the const container.
void resize(size_type __n)
Resizes the string to the specified number of characters.
void _M_invalidate_all() const
size_type find(const _CharT *__s, size_type __pos, size_type __n) const noexcept
Find position of a C substring.
size_type copy(_CharT *__s, size_type __n, size_type __pos=0) const
Copy substring into C string.
std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, bitset< _Nb > &__x)
Global I/O operators for bitsets.
size_type find_last_not_of(const basic_string &__str, size_type __pos=npos) const noexcept
Find last position of a character not in string.
const _CharT * c_str() const noexcept
Return const pointer to null-terminated contents.
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Primary class template hash.
basic_string & append(const basic_string &__str)
Append a string to this string.
static const size_type npos
Value returned by various member functions when they fail.
basic_string< wchar_t > wstring
A string of wchar_t.
Struct holding two objects of arbitrary type.
Base class for constructing a safe sequence type that tracks iterators that reference it...
basic_string< char > string
A string of char.
void pop_back()
Remove the last character.
size_type find_first_of(const basic_string &__str, size_type __pos=0) const noexcept
Find position of a character of string.
_Tp * begin(valarray< _Tp > &__va)
Return an iterator pointing to the first element of the valarray.
size_type find_first_not_of(const basic_string &__str, size_type __pos=0) const noexcept
Find position of a character not in string.
void reserve()
Equivalent to shrink_to_fit().
_Tp * end(valarray< _Tp > &__va)
Return an iterator pointing to one past the last element of the valarray.
Managing sequences of characters and character-like objects.
const _CharT * data() const noexcept
Return const pointer to contents.
_Iterator & base() noexcept
Return the underlying iterator.
#define __glibcxx_check_erase(_Position)
Template class basic_istream.
size_type rfind(const basic_string &__str, size_type __pos=npos) const noexcept
Find last position of a string.
const_reference at(size_type __n) const
Provides access to the data contained in the string.
const _CharT * __check_string(const _CharT *__s, _Integer __n, const char *__file, unsigned int __line, const char *__function)
basic_string & replace(size_type __pos, size_type __n, const basic_string &__str)
Replace characters with value from another string.
basic_string< char32_t > u32string
A string of char32_t.
constexpr complex< _Tp > operator+(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x plus y.
size_type capacity() const noexcept
void push_back(_CharT __c)
Append a single character.
Class std::basic_string with safety/checking/debug instrumentation.
constexpr _Iterator __base(_Iterator __it)
Safe class dealing with some allocator dependent operations.
allocator_type get_allocator() const noexcept
Return copy of allocator used to construct this string.
basic_string & erase(size_type __pos=0, size_type __n=npos)
Remove characters.
_T2 second
The second member.
Template class basic_ostream.
void insert(iterator __p, size_type __n, _CharT __c)
Insert multiple characters.
basic_string & assign(const basic_string &__str)
Set value to contents of another string.
#define __glibcxx_check_erase_range(_First, _Last)
#define __glibcxx_check_insert(_Position)
bool empty() const noexcept
#define __glibcxx_check_insert_range(_Position, _First, _Last, _Dist)
size_type find_last_of(const basic_string &__str, size_type __pos=npos) const noexcept
Find last position of a character of string.
int compare(const basic_string &__str) const
Compare to a string.
basic_string< char16_t > u16string
A string of char16_t.
basic_string substr(size_type __pos=0, size_type __n=npos) const
Get a substring.
constexpr auto size(const _Container &__cont) noexcept(noexcept(__cont.size())) -> decltype(__cont.size())
Return the size of a container.
basic_istream< _CharT, _Traits > & getline(basic_istream< _CharT, _Traits > &__is, basic_string< _CharT, _Traits, _Alloc > &__str, _CharT __delim)
Read a line from stream into a string.