32 #pragma GCC system_header
34 #if __cplusplus >= 201103L
42 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
44 _GLIBCXX_BEGIN_NAMESPACE_VERSION
54 template<
typename _CharT,
typename _Traits,
typename _Alloc,
55 template <
typename,
typename,
typename>
class _Base>
57 :
private _Base<_CharT, _Traits, _Alloc>
59 typedef _Base<_CharT, _Traits, _Alloc> __vstring_base;
60 typedef typename __vstring_base::_CharT_alloc_type _CharT_alloc_type;
65 typedef _Traits traits_type;
66 typedef typename _Traits::char_type value_type;
67 typedef _Alloc allocator_type;
68 typedef typename _CharT_alloc_type::size_type size_type;
69 typedef typename _CharT_alloc_type::difference_type difference_type;
70 typedef value_type& reference;
71 typedef const value_type& const_reference;
72 typedef typename _CharT_alloc_traits::pointer pointer;
73 typedef typename _CharT_alloc_traits::const_pointer const_pointer;
74 typedef __gnu_cxx::__normal_iterator<pointer, __versa_string> iterator;
75 typedef __gnu_cxx::__normal_iterator<const_pointer, __versa_string>
82 static const size_type
npos =
static_cast<size_type
>(-1);
86 _M_check(size_type __pos,
const char* __s)
const
88 if (__pos > this->
size())
89 std::__throw_out_of_range_fmt(__N(
"%s: __pos (which is %zu) > "
90 "this->size() (which is %zu)"),
91 __s, __pos, this->
size());
96 _M_check_length(size_type __n1, size_type __n2,
const char* __s)
const
99 std::__throw_length_error(__N(__s));
104 _M_limit(size_type __pos, size_type __off)
const _GLIBCXX_NOEXCEPT
106 const bool __testoff = __off < this->
size() - __pos;
107 return __testoff ? __off : this->
size() - __pos;
112 _M_disjunct(
const _CharT* __s)
const _GLIBCXX_NOEXCEPT
116 + this->
size(), __s));
122 _M_ibegin() const _GLIBCXX_NOEXCEPT
123 {
return iterator(this->_M_data()); }
126 _M_iend() const _GLIBCXX_NOEXCEPT
127 {
return iterator(this->_M_data() + this->_M_length()); }
139 : __vstring_base(__a) { }
147 : __vstring_base(__str) { }
149 #if __cplusplus >= 201103L
167 const _Alloc& __a = _Alloc())
168 : __vstring_base(__l.
begin(), __l.
end(), __a) { }
178 size_type __n =
npos)
179 : __vstring_base(__str._M_data()
180 + __str._M_check(__pos,
181 "__versa_string::__versa_string"),
182 __str._M_data() + __str._M_limit(__pos, __n)
183 + __pos, _Alloc()) { }
193 size_type __n,
const _Alloc& __a)
194 : __vstring_base(__str._M_data()
195 + __str._M_check(__pos,
196 "__versa_string::__versa_string"),
197 __str._M_data() + __str._M_limit(__pos, __n)
210 const _Alloc& __a = _Alloc())
211 : __vstring_base(__s, __s + __n, __a) { }
219 : __vstring_base(__s, __s ? __s + traits_type::
length(__s) :
229 : __vstring_base(__n, __c, __a) { }
237 #if __cplusplus >= 201103L
238 template<
class _InputIterator,
239 typename = std::_RequireInputIter<_InputIterator>>
241 template<
class _InputIterator>
244 const _Alloc& __a = _Alloc())
245 : __vstring_base(__beg, __end, __a) { }
258 {
return this->
assign(__str); }
260 #if __cplusplus >= 201103L
283 this->
assign(__l.begin(), __l.end());
294 {
return this->
assign(__s); }
319 return iterator(this->_M_data());
328 {
return const_iterator(this->_M_data()); }
338 return iterator(this->_M_data() + this->
size());
346 end() const _GLIBCXX_NOEXCEPT
347 {
return const_iterator(this->_M_data() + this->
size()); }
363 const_reverse_iterator
381 const_reverse_iterator
385 #if __cplusplus >= 201103L
392 {
return const_iterator(this->_M_data()); }
400 {
return const_iterator(this->_M_data() + this->
size()); }
407 const_reverse_iterator
416 const_reverse_iterator
427 {
return this->_M_length(); }
433 {
return this->_M_length(); }
438 {
return this->_M_max_size(); }
451 resize(size_type __n, _CharT __c);
465 { this->
resize(__n, _CharT()); }
467 #if __cplusplus >= 201103L
488 {
return this->_M_capacity(); }
509 { this->_M_reserve(__res_arg); }
516 { this->_M_clear(); }
522 _GLIBCXX_NODISCARD
bool
524 {
return this->
size() == 0; }
540 __glibcxx_assert(__pos <= this->
size());
541 return this->_M_data()[__pos];
559 __glibcxx_assert(__pos <= this->
size());
561 _GLIBCXX_DEBUG_PEDASSERT(__cplusplus >= 201103L
562 || __pos < this->
size());
564 return this->_M_data()[__pos];
578 at(size_type __n)
const
580 if (__n >= this->
size())
581 std::__throw_out_of_range_fmt(__N(
"__versa_string::at: __n "
582 "(which is %zu) >= this->size() "
585 return this->_M_data()[__n];
602 if (__n >= this->
size())
603 std::__throw_out_of_range_fmt(__N(
"__versa_string::at: __n "
604 "(which is %zu) >= this->size() "
608 return this->_M_data()[__n];
611 #if __cplusplus >= 201103L
653 {
return this->
append(__str); }
662 {
return this->
append(__s); }
676 #if __cplusplus >= 201103L
684 {
return this->
append(__l.begin(), __l.end()); }
694 {
return _M_append(__str._M_data(), __str.
size()); }
711 {
return _M_append(__str._M_data()
712 + __str._M_check(__pos,
"__versa_string::append"),
713 __str._M_limit(__pos, __n)); }
724 __glibcxx_requires_string_len(__s, __n);
725 _M_check_length(size_type(0), __n,
"__versa_string::append");
726 return _M_append(__s, __n);
737 __glibcxx_requires_string(__s);
738 const size_type __n = traits_type::length(__s);
739 _M_check_length(size_type(0), __n,
"__versa_string::append");
740 return _M_append(__s, __n);
753 {
return _M_replace_aux(this->
size(), size_type(0), __n, __c); }
755 #if __cplusplus >= 201103L
763 {
return this->
append(__l.begin(), __l.end()); }
774 #if __cplusplus >= 201103L
775 template<
class _InputIterator,
776 typename = std::_RequireInputIter<_InputIterator>>
778 template<
class _InputIterator>
781 append(_InputIterator __first, _InputIterator __last)
782 {
return this->
replace(_M_iend(), _M_iend(), __first, __last); }
791 const size_type __size = this->
size();
792 if (__size + 1 > this->
capacity() || this->_M_is_shared())
793 this->_M_mutate(__size, size_type(0), 0, size_type(1));
794 traits_type::assign(this->_M_data()[__size], __c);
795 this->_M_set_length(__size + 1);
806 this->_M_assign(__str);
810 #if __cplusplus >= 201103L
842 {
return _M_replace(size_type(0), this->
size(), __str._M_data()
843 + __str._M_check(__pos,
"__versa_string::assign"),
844 __str._M_limit(__pos, __n)); }
860 __glibcxx_requires_string_len(__s, __n);
861 return _M_replace(size_type(0), this->
size(), __s, __n);
876 __glibcxx_requires_string(__s);
877 return _M_replace(size_type(0), this->
size(), __s,
878 traits_type::length(__s));
892 {
return _M_replace_aux(size_type(0), this->
size(), __n, __c); }
903 #if __cplusplus >= 201103L
904 template<
class _InputIterator,
905 typename = std::_RequireInputIter<_InputIterator>>
907 template<
class _InputIterator>
910 assign(_InputIterator __first, _InputIterator __last)
911 {
return this->
replace(_M_ibegin(), _M_iend(), __first, __last); }
913 #if __cplusplus >= 201103L
921 {
return this->
assign(__l.begin(), __l.end()); }
924 #if __cplusplus >= 201103L
941 insert(const_iterator __p, size_type __n, _CharT __c)
943 _GLIBCXX_DEBUG_PEDASSERT(__p >= _M_ibegin() && __p <= _M_iend());
944 const size_type __pos = __p - _M_ibegin();
945 this->
replace(__p, __p, __n, __c);
946 return iterator(this->_M_data() + __pos);
963 insert(iterator __p, size_type __n, _CharT __c)
964 { this->
replace(__p, __p, __n, __c); }
967 #if __cplusplus >= 201103L
982 template<
class _InputIterator,
983 typename = std::_RequireInputIter<_InputIterator>>
985 insert(const_iterator __p, _InputIterator __beg, _InputIterator __end)
987 _GLIBCXX_DEBUG_PEDASSERT(__p >= _M_ibegin() && __p <= _M_iend());
988 const size_type __pos = __p - _M_ibegin();
989 this->
replace(__p, __p, __beg, __end);
990 return iterator(this->_M_data() + __pos);
1005 template<
class _InputIterator>
1007 insert(iterator __p, _InputIterator __beg, _InputIterator __end)
1008 { this->
replace(__p, __p, __beg, __end); }
1011 #if __cplusplus >= 201103L
1022 {
return this->
insert(__p, __l.begin(), __l.end()); }
1039 {
return this->
replace(__pos1, size_type(0),
1040 __str._M_data(), __str.
size()); }
1062 size_type __pos2, size_type __n)
1063 {
return this->
replace(__pos1, size_type(0), __str._M_data()
1064 + __str._M_check(__pos2,
"__versa_string::insert"),
1065 __str._M_limit(__pos2, __n)); }
1084 insert(size_type __pos,
const _CharT* __s, size_type __n)
1085 {
return this->
replace(__pos, size_type(0), __s, __n); }
1105 __glibcxx_requires_string(__s);
1106 return this->
replace(__pos, size_type(0), __s,
1107 traits_type::length(__s));
1127 insert(size_type __pos, size_type __n, _CharT __c)
1128 {
return _M_replace_aux(_M_check(__pos,
"__versa_string::insert"),
1129 size_type(0), __n, __c); }
1145 #if __cplusplus >= 201103L
1148 insert(iterator __p, _CharT __c)
1151 _GLIBCXX_DEBUG_PEDASSERT(__p >= _M_ibegin() && __p <= _M_iend());
1152 const size_type __pos = __p - _M_ibegin();
1153 _M_replace_aux(__pos, size_type(0), size_type(1), __c);
1154 this->_M_set_leaked();
1155 return iterator(this->_M_data() + __pos);
1176 this->_M_erase(_M_check(__pos,
"__versa_string::erase"),
1177 _M_limit(__pos, __n));
1190 #if __cplusplus >= 201103L
1193 erase(iterator __position)
1196 _GLIBCXX_DEBUG_PEDASSERT(__position >= _M_ibegin()
1197 && __position < _M_iend());
1198 const size_type __pos = __position - _M_ibegin();
1199 this->_M_erase(__pos, size_type(1));
1200 this->_M_set_leaked();
1201 return iterator(this->_M_data() + __pos);
1215 #if __cplusplus >= 201103L
1216 erase(const_iterator __first, const_iterator __last)
1218 erase(iterator __first, iterator __last)
1221 _GLIBCXX_DEBUG_PEDASSERT(__first >= _M_ibegin() && __first <= __last
1222 && __last <= _M_iend());
1223 const size_type __pos = __first - _M_ibegin();
1224 this->_M_erase(__pos, __last - __first);
1225 this->_M_set_leaked();
1226 return iterator(this->_M_data() + __pos);
1229 #if __cplusplus >= 201103L
1237 { this->_M_erase(
size()-1, 1); }
1259 {
return this->
replace(__pos, __n, __str._M_data(), __str.
size()); }
1282 size_type __pos2, size_type __n2)
1284 return this->
replace(__pos1, __n1, __str._M_data()
1285 + __str._M_check(__pos2,
1286 "__versa_string::replace"),
1287 __str._M_limit(__pos2, __n2));
1309 replace(size_type __pos, size_type __n1,
const _CharT* __s,
1312 __glibcxx_requires_string_len(__s, __n2);
1313 return _M_replace(_M_check(__pos,
"__versa_string::replace"),
1314 _M_limit(__pos, __n1), __s, __n2);
1333 replace(size_type __pos, size_type __n1,
const _CharT* __s)
1335 __glibcxx_requires_string(__s);
1336 return this->
replace(__pos, __n1, __s, traits_type::length(__s));
1357 replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
1358 {
return _M_replace_aux(_M_check(__pos,
"__versa_string::replace"),
1359 _M_limit(__pos, __n1), __n2, __c); }
1375 #if __cplusplus >= 201103L
1381 {
return this->
replace(__i1, __i2, __str._M_data(), __str.
size()); }
1398 #if __cplusplus >= 201103L
1400 const _CharT* __s, size_type __n)
1402 replace(iterator __i1, iterator __i2,
const _CharT* __s, size_type __n)
1405 _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
1406 && __i2 <= _M_iend());
1407 return this->
replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n);
1424 #if __cplusplus >= 201103L
1425 replace(const_iterator __i1, const_iterator __i2,
const _CharT* __s)
1427 replace(iterator __i1, iterator __i2,
const _CharT* __s)
1430 __glibcxx_requires_string(__s);
1431 return this->
replace(__i1, __i2, __s, traits_type::length(__s));
1449 #if __cplusplus >= 201103L
1450 replace(const_iterator __i1, const_iterator __i2, size_type __n,
1453 replace(iterator __i1, iterator __i2, size_type __n, _CharT __c)
1456 _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
1457 && __i2 <= _M_iend());
1458 return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c);
1475 #if __cplusplus >= 201103L
1476 template<
class _InputIterator,
1477 typename = std::_RequireInputIter<_InputIterator>>
1480 _InputIterator __k1, _InputIterator __k2)
1482 _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
1483 && __i2 <= _M_iend());
1484 __glibcxx_requires_valid_range(__k1, __k2);
1485 return this->_M_replace_dispatch(__i1, __i2, __k1, __k2,
1486 std::__false_type());
1489 template<
class _InputIterator>
1491 replace(iterator __i1, iterator __i2,
1492 _InputIterator __k1, _InputIterator __k2)
1494 _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
1495 && __i2 <= _M_iend());
1496 __glibcxx_requires_valid_range(__k1, __k2);
1497 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
1498 return this->_M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral());
1505 #if __cplusplus >= 201103L
1506 replace(const_iterator __i1, const_iterator __i2,
1507 _CharT* __k1, _CharT* __k2)
1509 replace(iterator __i1, iterator __i2,
1510 _CharT* __k1, _CharT* __k2)
1513 _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
1514 && __i2 <= _M_iend());
1515 __glibcxx_requires_valid_range(__k1, __k2);
1516 return this->
replace(__i1 - _M_ibegin(), __i2 - __i1,
1521 #if __cplusplus >= 201103L
1522 replace(const_iterator __i1, const_iterator __i2,
1523 const _CharT* __k1,
const _CharT* __k2)
1525 replace(iterator __i1, iterator __i2,
1526 const _CharT* __k1,
const _CharT* __k2)
1529 _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
1530 && __i2 <= _M_iend());
1531 __glibcxx_requires_valid_range(__k1, __k2);
1532 return this->
replace(__i1 - _M_ibegin(), __i2 - __i1,
1537 #if __cplusplus >= 201103L
1538 replace(const_iterator __i1, const_iterator __i2,
1539 iterator __k1, iterator __k2)
1541 replace(iterator __i1, iterator __i2,
1542 iterator __k1, iterator __k2)
1545 _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
1546 && __i2 <= _M_iend());
1547 __glibcxx_requires_valid_range(__k1, __k2);
1548 return this->
replace(__i1 - _M_ibegin(), __i2 - __i1,
1549 __k1.base(), __k2 - __k1);
1553 #if __cplusplus >= 201103L
1554 replace(const_iterator __i1, const_iterator __i2,
1555 const_iterator __k1, const_iterator __k2)
1557 replace(iterator __i1, iterator __i2,
1558 const_iterator __k1, const_iterator __k2)
1561 _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
1562 && __i2 <= _M_iend());
1563 __glibcxx_requires_valid_range(__k1, __k2);
1564 return this->
replace(__i1 - _M_ibegin(), __i2 - __i1,
1565 __k1.base(), __k2 - __k1);
1568 #if __cplusplus >= 201103L
1585 {
return this->
replace(__i1, __i2, __l.begin(), __l.end()); }
1589 template<
class _Integer>
1591 _M_replace_dispatch(const_iterator __i1, const_iterator __i2,
1592 _Integer __n, _Integer __val, std::__true_type)
1593 {
return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); }
1595 template<
class _InputIterator>
1597 _M_replace_dispatch(const_iterator __i1, const_iterator __i2,
1598 _InputIterator __k1, _InputIterator __k2,
1602 _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2,
1606 _M_replace(size_type __pos, size_type __len1,
const _CharT* __s,
1607 const size_type __len2);
1610 _M_append(
const _CharT* __s, size_type __n);
1627 copy(_CharT* __s, size_type __n, size_type __pos = 0)
const;
1638 { this->_M_swap(__s); }
1649 {
return this->_M_data(); }
1659 {
return this->_M_data(); }
1666 {
return allocator_type(this->_M_get_allocator()); }
1681 find(
const _CharT* __s, size_type __pos, size_type __n)
const;
1696 {
return this->
find(__str.
data(), __pos, __str.
size()); }
1709 find(
const _CharT* __s, size_type __pos = 0)
const
1711 __glibcxx_requires_string(__s);
1712 return this->
find(__s, __pos, traits_type::length(__s));
1726 find(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT;
1741 {
return this->
rfind(__str.data(), __pos, __str.size()); }
1756 rfind(
const _CharT* __s, size_type __pos, size_type __n)
const;
1771 __glibcxx_requires_string(__s);
1772 return this->
rfind(__s, __pos, traits_type::length(__s));
1786 rfind(_CharT __c, size_type __pos =
npos)
const _GLIBCXX_NOEXCEPT;
1816 find_first_of(
const _CharT* __s, size_type __pos, size_type __n)
const;
1831 __glibcxx_requires_string(__s);
1832 return this->
find_first_of(__s, __pos, traits_type::length(__s));
1849 {
return this->
find(__c, __pos); }
1880 find_last_of(
const _CharT* __s, size_type __pos, size_type __n)
const;
1895 __glibcxx_requires_string(__s);
1896 return this->
find_last_of(__s, __pos, traits_type::length(__s));
1913 {
return this->
rfind(__c, __pos); }
1944 size_type __n)
const;
1959 __glibcxx_requires_string(__s);
1990 size_type __pos =
npos) const _GLIBCXX_NOEXCEPT
2007 size_type __n)
const;
2022 __glibcxx_requires_string(__s);
2055 return __versa_string(*
this, _M_check(__pos,
"__versa_string::substr"),
2076 if (this->_M_compare(__str))
2079 const size_type __size = this->
size();
2080 const size_type __osize = __str.
size();
2081 const size_type __len =
std::min(__size, __osize);
2083 int __r = traits_type::compare(this->_M_data(), __str.
data(), __len);
2085 __r = this->_S_compare(__size, __osize);
2109 compare(size_type __pos, size_type __n,
2137 size_type __pos2, size_type __n2)
const;
2155 compare(
const _CharT* __s)
const;
2179 compare(size_type __pos, size_type __n1,
const _CharT* __s)
const;
2206 compare(size_type __pos, size_type __n1,
const _CharT* __s,
2207 size_type __n2)
const;
2217 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2218 template <
typename,
typename,
typename>
class _Base>
2219 __versa_string<_CharT, _Traits, _Alloc, _Base>
2220 operator+(
const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
2221 const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs);
2229 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2230 template <
typename,
typename,
typename>
class _Base>
2231 __versa_string<_CharT, _Traits, _Alloc, _Base>
2232 operator+(
const _CharT* __lhs,
2233 const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs);
2241 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2242 template <
typename,
typename,
typename>
class _Base>
2243 __versa_string<_CharT, _Traits, _Alloc, _Base>
2244 operator+(_CharT __lhs,
2245 const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs);
2253 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2254 template <
typename,
typename,
typename>
class _Base>
2255 __versa_string<_CharT, _Traits, _Alloc, _Base>
2256 operator+(
const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
2257 const _CharT* __rhs);
2265 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2266 template <
typename,
typename,
typename>
class _Base>
2267 __versa_string<_CharT, _Traits, _Alloc, _Base>
2268 operator+(
const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
2271 #if __cplusplus >= 201103L
2272 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2273 template <
typename,
typename,
typename>
class _Base>
2274 inline __versa_string<_CharT, _Traits, _Alloc, _Base>
2275 operator+(__versa_string<_CharT, _Traits, _Alloc, _Base>&& __lhs,
2276 const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
2277 {
return std::move(__lhs.append(__rhs)); }
2279 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2280 template <
typename,
typename,
typename>
class _Base>
2281 inline __versa_string<_CharT, _Traits, _Alloc, _Base>
2282 operator+(
const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
2283 __versa_string<_CharT, _Traits, _Alloc, _Base>&& __rhs)
2284 {
return std::move(__rhs.insert(0, __lhs)); }
2286 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2287 template <
typename,
typename,
typename>
class _Base>
2288 inline __versa_string<_CharT, _Traits, _Alloc, _Base>
2289 operator+(__versa_string<_CharT, _Traits, _Alloc, _Base>&& __lhs,
2290 __versa_string<_CharT, _Traits, _Alloc, _Base>&& __rhs)
2292 const auto __size = __lhs.size() + __rhs.size();
2293 const bool __cond = (__size > __lhs.capacity()
2294 && __size <= __rhs.capacity());
2295 return __cond ?
std::move(__rhs.insert(0, __lhs))
2296 :
std::
move(__lhs.append(__rhs));
2299 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2300 template <
typename,
typename,
typename>
class _Base>
2301 inline __versa_string<_CharT, _Traits, _Alloc, _Base>
2303 __versa_string<_CharT, _Traits, _Alloc, _Base>&& __rhs)
2304 {
return std::move(__rhs.insert(0, __lhs)); }
2306 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2307 template <
typename,
typename,
typename>
class _Base>
2308 inline __versa_string<_CharT, _Traits, _Alloc, _Base>
2310 __versa_string<_CharT, _Traits, _Alloc, _Base>&& __rhs)
2311 {
return std::move(__rhs.insert(0, 1, __lhs)); }
2313 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2314 template <
typename,
typename,
typename>
class _Base>
2315 inline __versa_string<_CharT, _Traits, _Alloc, _Base>
2316 operator+(__versa_string<_CharT, _Traits, _Alloc, _Base>&& __lhs,
2317 const _CharT* __rhs)
2318 {
return std::move(__lhs.append(__rhs)); }
2320 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2321 template <
typename,
typename,
typename>
class _Base>
2322 inline __versa_string<_CharT, _Traits, _Alloc, _Base>
2323 operator+(__versa_string<_CharT, _Traits, _Alloc, _Base>&& __lhs,
2325 {
return std::move(__lhs.append(1, __rhs)); }
2335 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2336 template <
typename,
typename,
typename>
class _Base>
2340 {
return __lhs.
compare(__rhs) == 0; }
2342 template<
typename _CharT,
2343 template <
typename,
typename,
typename>
class _Base>
2344 inline typename __enable_if<std::__is_char<_CharT>::__value,
bool>::__type
2349 {
return (__lhs.size() == __rhs.size()
2359 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2360 template <
typename,
typename,
typename>
class _Base>
2362 operator==(
const _CharT* __lhs,
2364 {
return __rhs.
compare(__lhs) == 0; }
2372 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2373 template <
typename,
typename,
typename>
class _Base>
2376 const _CharT* __rhs)
2377 {
return __lhs.
compare(__rhs) == 0; }
2386 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2387 template <
typename,
typename,
typename>
class _Base>
2391 {
return !(__lhs == __rhs); }
2399 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2400 template <
typename,
typename,
typename>
class _Base>
2402 operator!=(
const _CharT* __lhs,
2404 {
return !(__lhs == __rhs); }
2412 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2413 template <
typename,
typename,
typename>
class _Base>
2416 const _CharT* __rhs)
2417 {
return !(__lhs == __rhs); }
2426 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2427 template <
typename,
typename,
typename>
class _Base>
2431 {
return __lhs.
compare(__rhs) < 0; }
2439 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2440 template <
typename,
typename,
typename>
class _Base>
2443 const _CharT* __rhs)
2444 {
return __lhs.
compare(__rhs) < 0; }
2452 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2453 template <
typename,
typename,
typename>
class _Base>
2455 operator<(
const _CharT* __lhs,
2457 {
return __rhs.
compare(__lhs) > 0; }
2466 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2467 template <
typename,
typename,
typename>
class _Base>
2471 {
return __lhs.
compare(__rhs) > 0; }
2479 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2480 template <
typename,
typename,
typename>
class _Base>
2483 const _CharT* __rhs)
2484 {
return __lhs.
compare(__rhs) > 0; }
2492 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2493 template <
typename,
typename,
typename>
class _Base>
2495 operator>(
const _CharT* __lhs,
2497 {
return __rhs.
compare(__lhs) < 0; }
2506 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2507 template <
typename,
typename,
typename>
class _Base>
2511 {
return __lhs.
compare(__rhs) <= 0; }
2519 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2520 template <
typename,
typename,
typename>
class _Base>
2523 const _CharT* __rhs)
2524 {
return __lhs.
compare(__rhs) <= 0; }
2532 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2533 template <
typename,
typename,
typename>
class _Base>
2535 operator<=(
const _CharT* __lhs,
2537 {
return __rhs.
compare(__lhs) >= 0; }
2546 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2547 template <
typename,
typename,
typename>
class _Base>
2551 {
return __lhs.
compare(__rhs) >= 0; }
2559 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2560 template <
typename,
typename,
typename>
class _Base>
2563 const _CharT* __rhs)
2564 {
return __lhs.
compare(__rhs) >= 0; }
2572 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2573 template <
typename,
typename,
typename>
class _Base>
2575 operator>=(
const _CharT* __lhs,
2577 {
return __rhs.
compare(__lhs) <= 0; }
2586 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2587 template <
typename,
typename,
typename>
class _Base>
2591 { __lhs.
swap(__rhs); }
2593 _GLIBCXX_END_NAMESPACE_VERSION
2596 namespace std _GLIBCXX_VISIBILITY(default)
2598 _GLIBCXX_BEGIN_NAMESPACE_VERSION
2612 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2613 template <
typename,
typename,
typename>
class _Base>
2614 basic_istream<_CharT, _Traits>&
2617 _Alloc, _Base>& __str);
2628 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2629 template <
typename,
typename,
typename>
class _Base>
2637 return __ostream_insert(__os, __str.
data(), __str.
size());
2654 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2655 template <
typename,
typename,
typename>
class _Base>
2656 basic_istream<_CharT, _Traits>&
2657 getline(basic_istream<_CharT, _Traits>& __is,
2674 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2675 template <
typename,
typename,
typename>
class _Base>
2676 inline basic_istream<_CharT, _Traits>&
2681 _GLIBCXX_END_NAMESPACE_VERSION
2684 #if __cplusplus >= 201103L
2688 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
2690 _GLIBCXX_BEGIN_NAMESPACE_VERSION
2692 #if _GLIBCXX_USE_C99_STDLIB
2695 stoi(
const __vstring& __str, std::size_t* __idx = 0,
int __base = 10)
2696 {
return __gnu_cxx::__stoa<long, int>(&std::strtol,
"stoi", __str.c_str(),
2700 stol(
const __vstring& __str, std::size_t* __idx = 0,
int __base = 10)
2701 {
return __gnu_cxx::__stoa(&std::strtol,
"stol", __str.c_str(),
2704 inline unsigned long
2705 stoul(
const __vstring& __str, std::size_t* __idx = 0,
int __base = 10)
2706 {
return __gnu_cxx::__stoa(&std::strtoul,
"stoul", __str.c_str(),
2710 stoll(
const __vstring& __str, std::size_t* __idx = 0,
int __base = 10)
2711 {
return __gnu_cxx::__stoa(&std::strtoll,
"stoll", __str.c_str(),
2714 inline unsigned long long
2715 stoull(
const __vstring& __str, std::size_t* __idx,
int __base = 10)
2716 {
return __gnu_cxx::__stoa(&std::strtoull,
"stoull", __str.c_str(),
2721 stof(
const __vstring& __str, std::size_t* __idx = 0)
2722 {
return __gnu_cxx::__stoa(&std::strtof,
"stof", __str.c_str(), __idx); }
2725 stod(
const __vstring& __str, std::size_t* __idx = 0)
2726 {
return __gnu_cxx::__stoa(&std::strtod,
"stod", __str.c_str(), __idx); }
2729 stold(
const __vstring& __str, std::size_t* __idx = 0)
2730 {
return __gnu_cxx::__stoa(&std::strtold,
"stold", __str.c_str(), __idx); }
2733 #if _GLIBCXX_USE_C99_STDIO
2738 to_string(
int __val)
2739 {
return __gnu_cxx::__to_xstring<__vstring>(&std::vsnprintf, 4 *
sizeof(
int),
2743 to_string(
unsigned __val)
2744 {
return __gnu_cxx::__to_xstring<__vstring>(&std::vsnprintf,
2745 4 *
sizeof(
unsigned),
2749 to_string(
long __val)
2750 {
return __gnu_cxx::__to_xstring<__vstring>(&std::vsnprintf,
2755 to_string(
unsigned long __val)
2756 {
return __gnu_cxx::__to_xstring<__vstring>(&std::vsnprintf,
2757 4 *
sizeof(
unsigned long),
2762 to_string(
long long __val)
2763 {
return __gnu_cxx::__to_xstring<__vstring>(&std::vsnprintf,
2764 4 *
sizeof(
long long),
2768 to_string(
unsigned long long __val)
2769 {
return __gnu_cxx::__to_xstring<__vstring>(&std::vsnprintf,
2770 4 *
sizeof(
unsigned long long),
2774 to_string(
float __val)
2776 const int __n = __numeric_traits<float>::__max_exponent10 + 20;
2777 return __gnu_cxx::__to_xstring<__vstring>(&std::vsnprintf, __n,
2782 to_string(
double __val)
2784 const int __n = __numeric_traits<double>::__max_exponent10 + 20;
2785 return __gnu_cxx::__to_xstring<__vstring>(&std::vsnprintf, __n,
2790 to_string(
long double __val)
2792 const int __n = __numeric_traits<long double>::__max_exponent10 + 20;
2793 return __gnu_cxx::__to_xstring<__vstring>(&std::vsnprintf, __n,
2798 #if defined(_GLIBCXX_USE_WCHAR_T) && _GLIBCXX_USE_C99_WCHAR
2800 stoi(
const __wvstring& __str, std::size_t* __idx = 0,
int __base = 10)
2801 {
return __gnu_cxx::__stoa<long, int>(&std::wcstol,
"stoi", __str.c_str(),
2805 stol(
const __wvstring& __str, std::size_t* __idx = 0,
int __base = 10)
2806 {
return __gnu_cxx::__stoa(&std::wcstol,
"stol", __str.c_str(),
2809 inline unsigned long
2810 stoul(
const __wvstring& __str, std::size_t* __idx = 0,
int __base = 10)
2811 {
return __gnu_cxx::__stoa(&std::wcstoul,
"stoul", __str.c_str(),
2815 stoll(
const __wvstring& __str, std::size_t* __idx = 0,
int __base = 10)
2816 {
return __gnu_cxx::__stoa(&std::wcstoll,
"stoll", __str.c_str(),
2819 inline unsigned long long
2820 stoull(
const __wvstring& __str, std::size_t* __idx = 0,
int __base = 10)
2821 {
return __gnu_cxx::__stoa(&std::wcstoull,
"stoull", __str.c_str(),
2826 stof(
const __wvstring& __str, std::size_t* __idx = 0)
2827 {
return __gnu_cxx::__stoa(&std::wcstof,
"stof", __str.c_str(), __idx); }
2830 stod(
const __wvstring& __str, std::size_t* __idx = 0)
2831 {
return __gnu_cxx::__stoa(&std::wcstod,
"stod", __str.c_str(), __idx); }
2834 stold(
const __wvstring& __str, std::size_t* __idx = 0)
2835 {
return __gnu_cxx::__stoa(&std::wcstold,
"stold", __str.c_str(), __idx); }
2837 #ifndef _GLIBCXX_HAVE_BROKEN_VSWPRINTF
2840 to_wstring(
int __val)
2841 {
return __gnu_cxx::__to_xstring<__wvstring>(&std::vswprintf,
2846 to_wstring(
unsigned __val)
2847 {
return __gnu_cxx::__to_xstring<__wvstring>(&std::vswprintf,
2848 4 *
sizeof(
unsigned),
2852 to_wstring(
long __val)
2853 {
return __gnu_cxx::__to_xstring<__wvstring>(&std::vswprintf,
2858 to_wstring(
unsigned long __val)
2859 {
return __gnu_cxx::__to_xstring<__wvstring>(&std::vswprintf,
2860 4 *
sizeof(
unsigned long),
2864 to_wstring(
long long __val)
2865 {
return __gnu_cxx::__to_xstring<__wvstring>(&std::vswprintf,
2866 4 *
sizeof(
long long),
2870 to_wstring(
unsigned long long __val)
2871 {
return __gnu_cxx::__to_xstring<__wvstring>(&std::vswprintf,
2872 4 *
sizeof(
unsigned long long),
2876 to_wstring(
float __val)
2878 const int __n = __numeric_traits<float>::__max_exponent10 + 20;
2879 return __gnu_cxx::__to_xstring<__wvstring>(&std::vswprintf, __n,
2884 to_wstring(
double __val)
2886 const int __n = __numeric_traits<double>::__max_exponent10 + 20;
2887 return __gnu_cxx::__to_xstring<__wvstring>(&std::vswprintf, __n,
2892 to_wstring(
long double __val)
2894 const int __n = __numeric_traits<long double>::__max_exponent10 + 20;
2895 return __gnu_cxx::__to_xstring<__wvstring>(&std::vswprintf, __n,
2901 _GLIBCXX_END_NAMESPACE_VERSION
2906 #if __cplusplus >= 201103L
2910 namespace std _GLIBCXX_VISIBILITY(default)
2912 _GLIBCXX_BEGIN_NAMESPACE_VERSION
2917 :
public __hash_base<size_t, __gnu_cxx::__vstring>
2921 {
return std::_Hash_impl::hash(__s.
data(), __s.
length()); }
2924 #ifdef _GLIBCXX_USE_WCHAR_T
2928 :
public __hash_base<size_t, __gnu_cxx::__wvstring>
2932 {
return std::_Hash_impl::hash(__s.
data(),
2933 __s.
length() *
sizeof(
wchar_t)); }
2940 :
public __hash_base<size_t, __gnu_cxx::__u16vstring>
2944 {
return std::_Hash_impl::hash(__s.
data(),
2945 __s.
length() *
sizeof(char16_t)); }
2951 :
public __hash_base<size_t, __gnu_cxx::__u32vstring>
2955 {
return std::_Hash_impl::hash(__s.
data(),
2956 __s.
length() *
sizeof(char32_t)); }
2959 _GLIBCXX_END_NAMESPACE_VERSION
constexpr complex< _Tp > operator+(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x plus y.
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
constexpr const _Tp & min(const _Tp &, const _Tp &)
This does what you think it does.
ISO C++ entities toplevel namespace is std.
std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, bitset< _Nb > &__x)
Global I/O operators for bitsets.
std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const bitset< _Nb > &__x)
Global I/O operators for bitsets.
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.
GNU extensions for public use.
constexpr _Iterator __base(_Iterator __it)
char_type widen(char __c) const
Widens characters.
Template class basic_istream.
Template class basic_ostream.
Primary class template hash.
The standard allocator, as per C++03 [20.4.1].
Basis for explicit traits specializations.
One of the comparison functors.
Uniform interface to C++98 and C++11 allocators.
Template class __versa_string.
__versa_string & operator=(const _CharT *__s)
Copy contents of __s into this string.
void swap(__versa_string &__s) noexcept
Swap contents with another string.
reverse_iterator rend() noexcept
iterator begin() noexcept
__versa_string & assign(_InputIterator __first, _InputIterator __last)
Set value to a range of characters.
iterator insert(const_iterator __p, _CharT __c)
Insert one character.
size_type find_last_of(const _CharT *__s, size_type __pos=npos) const
Find last position of a character of C string.
size_type find_last_of(const __versa_string &__str, size_type __pos=npos) const noexcept
Find last position of a character of string.
__versa_string & operator+=(std::initializer_list< _CharT > __l)
Append an initializer_list of characters.
size_type find_first_not_of(const __versa_string &__str, size_type __pos=0) const noexcept
Find position of a character not in string.
size_type find(const _CharT *__s, size_type __pos, size_type __n) const
Find position of a C substring.
const_reference at(size_type __n) const
Provides access to the data contained in the string.
size_type find_first_of(_CharT __c, size_type __pos=0) const noexcept
Find position of a character.
__versa_string & replace(size_type __pos1, size_type __n1, const __versa_string &__str, size_type __pos2, size_type __n2)
Replace characters with value from another string.
__versa_string & replace(const_iterator __i1, const_iterator __i2, const __versa_string &__str)
Replace range of characters with string.
const_reference front() const noexcept
__versa_string & insert(size_type __pos, size_type __n, _CharT __c)
Insert multiple characters.
__versa_string & assign(const __versa_string &__str)
Set value to contents of another string.
__versa_string & assign(__versa_string &&__str) noexcept
Set value to contents of another string.
__versa_string & replace(size_type __pos, size_type __n1, const _CharT *__s, size_type __n2)
Replace characters with value of a C substring.
__versa_string & insert(size_type __pos1, const __versa_string &__str)
Insert value of a string.
__versa_string & append(size_type __n, _CharT __c)
Append multiple characters.
size_type find_last_not_of(const __versa_string &__str, size_type __pos=npos) const noexcept
Find last position of a character not in string.
__versa_string & operator=(__versa_string &&__str) noexcept
String move assignment operator.
const_iterator cend() const noexcept
__versa_string & replace(const_iterator __i1, const_iterator __i2, const _CharT *__s, size_type __n)
Replace range of characters with C substring.
__versa_string & operator+=(const __versa_string &__str)
Append a string to this string.
const _CharT * data() const noexcept
Return const pointer to contents.
__versa_string & append(std::initializer_list< _CharT > __l)
Append an initializer_list of characters.
size_type find_first_of(const __versa_string &__str, size_type __pos=0) const noexcept
Find position of a character of string.
__versa_string(_InputIterator __beg, _InputIterator __end, const _Alloc &__a=_Alloc())
Construct string as copy of a range.
__versa_string(const _Alloc &__a=_Alloc()) noexcept
Construct an empty string using allocator a.
__versa_string & insert(size_type __pos1, const __versa_string &__str, size_type __pos2, size_type __n)
Insert a substring.
size_type find(const __versa_string &__str, size_type __pos=0) const noexcept
Find position of a string.
const_reverse_iterator rbegin() const noexcept
size_type find_last_not_of(const _CharT *__s, size_type __pos=npos) const
Find last position of a character not in C string.
__versa_string(std::initializer_list< _CharT > __l, const _Alloc &__a=_Alloc())
Construct string from an initializer list.
void resize(size_type __n, _CharT __c)
Resizes the string to the specified number of characters.
const _CharT * c_str() const noexcept
Return const pointer to null-terminated contents.
allocator_type get_allocator() const noexcept
Return copy of allocator used to construct this string.
iterator erase(const_iterator __position)
Remove one character.
size_type capacity() const noexcept
__versa_string & operator+=(const _CharT *__s)
Append a C string.
__versa_string & operator=(const __versa_string &__str)
Assign the value of str to this string.
iterator insert(const_iterator __p, std::initializer_list< _CharT > __l)
Insert an initializer_list of characters.
__versa_string & assign(const _CharT *__s, size_type __n)
Set value to a C substring.
~__versa_string() noexcept
Destroy the string instance.
static const size_type npos
Value returned by various member functions when they fail.
reference back() noexcept
__versa_string & insert(size_type __pos, const _CharT *__s, size_type __n)
Insert a C substring.
size_type find_first_not_of(const _CharT *__s, size_type __pos=0) const
Find position of a character not in C string.
reference at(size_type __n)
Provides access to the data contained in the string.
iterator erase(const_iterator __first, const_iterator __last)
Remove a range of characters.
__versa_string(__versa_string &&__str) noexcept
String move constructor.
size_type length() const noexcept
Returns the number of characters in the string, not including any null-termination.
size_type size() const noexcept
Returns the number of characters in the string, not including any null-termination.
__versa_string & append(const __versa_string &__str)
Append a string to this string.
int compare(const __versa_string &__str) const
Compare to a string.
void shrink_to_fit() noexcept
A non-binding request to reduce capacity() to size().
__versa_string & replace(const_iterator __i1, const_iterator __i2, _InputIterator __k1, _InputIterator __k2)
Replace range of characters with range.
__versa_string(size_type __n, _CharT __c, const _Alloc &__a=_Alloc())
Construct string as multiple characters.
__versa_string & insert(size_type __pos, const _CharT *__s)
Insert a C string.
__versa_string & replace(const_iterator __i1, const_iterator __i2, std::initializer_list< _CharT > __l)
Replace range of characters with initializer_list.
bool empty() const noexcept
reference operator[](size_type __pos) noexcept
Subscript access to the data contained in the string.
__versa_string(const _CharT *__s, size_type __n, const _Alloc &__a=_Alloc())
Construct string initialized by a character array.
iterator insert(const_iterator __p, _InputIterator __beg, _InputIterator __end)
Insert a range of characters.
__versa_string & append(_InputIterator __first, _InputIterator __last)
Append a range of characters.
__versa_string & assign(const _CharT *__s)
Set value to contents of a C string.
__versa_string & operator=(_CharT __c)
Set value to string of length 1.
const_reference back() const noexcept
__versa_string & operator=(std::initializer_list< _CharT > __l)
Set value to string constructed from initializer list.
void resize(size_type __n)
Resizes the string to the specified number of characters.
const_reverse_iterator crbegin() const noexcept
__versa_string & replace(const_iterator __i1, const_iterator __i2, const _CharT *__s)
Replace range of characters with C string.
const_iterator begin() const noexcept
const_reverse_iterator rend() const noexcept
__versa_string & replace(size_type __pos, size_type __n, const __versa_string &__str)
Replace characters with value from another string.
const_reference operator[](size_type __pos) const noexcept
Subscript access to the data contained in the string.
__versa_string & assign(std::initializer_list< _CharT > __l)
Set value to an initializer_list of characters.
__versa_string substr(size_type __pos=0, size_type __n=npos) const
Get a substring.
__versa_string & assign(const __versa_string &__str, size_type __pos, size_type __n)
Set value to a substring of a string.
__versa_string(const _CharT *__s, const _Alloc &__a=_Alloc())
Construct string as copy of a C string.
__versa_string(const __versa_string &__str, size_type __pos, size_type __n=npos)
Construct string as copy of a substring.
__versa_string(const __versa_string &__str, size_type __pos, size_type __n, const _Alloc &__a)
Construct string as copy of a substring.
__versa_string & operator+=(_CharT __c)
Append a character.
size_type max_size() const noexcept
Returns the size() of the largest possible string.
const_iterator end() const noexcept
__versa_string & replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
Replace characters with multiple characters.
const_iterator cbegin() const noexcept
__versa_string & assign(size_type __n, _CharT __c)
Set value to multiple characters.
size_type rfind(const _CharT *__s, size_type __pos=npos) const
Find last position of a C string.
size_type copy(_CharT *__s, size_type __n, size_type __pos=0) const
Copy substring into C string.
__versa_string & erase(size_type __pos=0, size_type __n=npos)
Remove characters.
size_type find_first_of(const _CharT *__s, size_type __pos=0) const
Find position of a character of C string.
iterator insert(const_iterator __p, size_type __n, _CharT __c)
Insert multiple characters.
void push_back(_CharT __c)
Append a single character.
size_type find_last_of(_CharT __c, size_type __pos=npos) const noexcept
Find last position of a character.
__versa_string & replace(size_type __pos, size_type __n1, const _CharT *__s)
Replace characters with value of a C string.
__versa_string & append(const __versa_string &__str, size_type __pos, size_type __n)
Append a substring.
reference front() noexcept
__versa_string & append(const _CharT *__s)
Append a C string.
__versa_string(const __versa_string &__str)
Construct string with copy of value of __str.
__versa_string & append(const _CharT *__s, size_type __n)
Append a C substring.
void reserve(size_type __res_arg=0)
Attempt to preallocate enough memory for specified number of characters.
size_type rfind(const __versa_string &__str, size_type __pos=npos) const noexcept
Find last position of a string.
const_reverse_iterator crend() const noexcept
__versa_string & replace(const_iterator __i1, const_iterator __i2, size_type __n, _CharT __c)
Replace range of characters with multiple characters.
void pop_back()
Remove the last character.
reverse_iterator rbegin() noexcept
size_type find(const _CharT *__s, size_type __pos=0) const
Find position of a C string.