33#pragma GCC system_header
38#if __cplusplus >= 201103L
59 template<
typename _CharT,
typename _Traits,
typename _Alloc,
60 template <
typename,
typename,
typename>
class _Base>
62 :
private _Base<_CharT, _Traits, _Alloc>
73 typedef typename _CharT_alloc_type::size_type
size_type;
93 if (__pos > this->
size())
95 "this->size() (which is %zu)"),
96 __s, __pos, this->
size());
111 const bool __testoff = __off < this->
size() - __pos;
112 return __testoff ? __off : this->
size() - __pos;
121 + this->
size(), __s));
128 {
return iterator(this->_M_data()); }
132 {
return iterator(this->_M_data() + this->_M_length()); }
154#if __cplusplus >= 201103L
172 const _Alloc& __a = _Alloc())
186 "__versa_string::__versa_string"),
187 __str._M_data() + __str.
_M_limit(__pos, __n)
188 + __pos, _Alloc()) { }
201 "__versa_string::__versa_string"),
202 __str._M_data() + __str.
_M_limit(__pos, __n)
215 const _Alloc& __a = _Alloc())
242#if __cplusplus >= 201103L
243 template<
class _InputIterator,
246 template<
class _InputIterator>
249 const _Alloc& __a = _Alloc())
263 {
return this->
assign(__str); }
265#if __cplusplus >= 201103L
299 {
return this->
assign(__s); }
351 end() const _GLIBCXX_NOEXCEPT
368 const_reverse_iterator
386 const_reverse_iterator
390#if __cplusplus >= 201103L
412 const_reverse_iterator
421 const_reverse_iterator
432 {
return this->_M_length(); }
438 {
return this->_M_length(); }
443 {
return this->_M_max_size(); }
470 { this->
resize(__n, _CharT()); }
472#if __cplusplus >= 201103L
493 {
return this->_M_capacity(); }
514 { this->_M_reserve(__res_arg); }
521 { this->_M_clear(); }
529 {
return this->
size() == 0; }
546 return this->_M_data()[__pos];
567 || __pos < this->
size());
569 return this->_M_data()[__pos];
585 if (__n >= this->
size())
587 "(which is %zu) >= this->size() "
590 return this->_M_data()[__n];
607 if (__n >= this->
size())
609 "(which is %zu) >= this->size() "
613 return this->_M_data()[__n];
616#if __cplusplus >= 201103L
658 {
return this->
append(__str); }
667 {
return this->
append(__s); }
681#if __cplusplus >= 201103L
717 + __str.
_M_check(__pos,
"__versa_string::append"),
743 const size_type __n = traits_type::length(__s);
760#if __cplusplus >= 201103L
779#if __cplusplus >= 201103L
780 template<
class _InputIterator,
783 template<
class _InputIterator>
786 append(_InputIterator __first, _InputIterator __last)
797 if (__size + 1 > this->
capacity() || this->_M_is_shared())
799 traits_type::assign(this->_M_data()[__size], __c);
800 this->_M_set_length(__size + 1);
811 this->_M_assign(__str);
815#if __cplusplus >= 201103L
848 + __str.
_M_check(__pos,
"__versa_string::assign"),
883 traits_type::length(__s));
908#if __cplusplus >= 201103L
909 template<
class _InputIterator,
912 template<
class _InputIterator>
915 assign(_InputIterator __first, _InputIterator __last)
918#if __cplusplus >= 201103L
929#if __cplusplus >= 201103L
950 this->
replace(__p, __p, __n, __c);
951 return iterator(this->_M_data() + __pos);
968 insert(iterator __p, size_type __n, _CharT __c)
969 { this->
replace(__p, __p, __n, __c); }
972#if __cplusplus >= 201103L
987 template<
class _InputIterator,
994 this->
replace(__p, __p, __beg, __end);
995 return iterator(this->_M_data() + __pos);
1010 template<
class _InputIterator>
1012 insert(iterator __p, _InputIterator __beg, _InputIterator __end)
1013 { this->
replace(__p, __p, __beg, __end); }
1016#if __cplusplus >= 201103L
1045 __str._M_data(), __str.
size()); }
1069 + __str.
_M_check(__pos2,
"__versa_string::insert"),
1112 traits_type::length(__s));
1150#if __cplusplus >= 201103L
1159 this->_M_set_leaked();
1160 return iterator(this->_M_data() + __pos);
1181 this->_M_erase(
_M_check(__pos,
"__versa_string::erase"),
1195#if __cplusplus >= 201103L
1205 this->_M_set_leaked();
1206 return iterator(this->_M_data() + __pos);
1220#if __cplusplus >= 201103L
1229 this->_M_erase(__pos, __last - __first);
1230 this->_M_set_leaked();
1231 return iterator(this->_M_data() + __pos);
1234#if __cplusplus >= 201103L
1242 { this->_M_erase(
size()-1, 1); }
1264 {
return this->
replace(__pos, __n, __str._M_data(), __str.
size()); }
1289 return this->
replace(__pos1, __n1, __str._M_data()
1291 "__versa_string::replace"),
1341 return this->
replace(__pos, __n1, __s, traits_type::length(__s));
1364 _M_limit(__pos, __n1), __n2, __c); }
1380#if __cplusplus >= 201103L
1386 {
return this->
replace(__i1, __i2, __str._M_data(), __str.
size()); }
1403#if __cplusplus >= 201103L
1429#if __cplusplus >= 201103L
1436 return this->
replace(__i1, __i2, __s, traits_type::length(__s));
1454#if __cplusplus >= 201103L
1480#if __cplusplus >= 201103L
1481 template<
class _InputIterator,
1485 _InputIterator __k1, _InputIterator __k2)
1494 template<
class _InputIterator>
1496 replace(iterator __i1, iterator __i2,
1497 _InputIterator __k1, _InputIterator __k2)
1510#if __cplusplus >= 201103L
1512 _CharT* __k1, _CharT* __k2)
1515 _CharT* __k1, _CharT* __k2)
1526#if __cplusplus >= 201103L
1528 const _CharT* __k1,
const _CharT* __k2)
1531 const _CharT* __k1,
const _CharT* __k2)
1542#if __cplusplus >= 201103L
1554 __k1.
base(), __k2 - __k1);
1558#if __cplusplus >= 201103L
1570 __k1.
base(), __k2 - __k1);
1573#if __cplusplus >= 201103L
1594 template<
class _Integer>
1600 template<
class _InputIterator>
1603 _InputIterator __k1, _InputIterator __k2,
1643 { this->_M_swap(__s); }
1654 {
return this->_M_data(); }
1664 {
return this->_M_data(); }
1701 {
return this->
find(__str.
data(), __pos, __str.
size()); }
1717 return this->
find(__s, __pos, traits_type::length(__s));
1746 {
return this->
rfind(__str.data(), __pos, __str.size()); }
1777 return this->
rfind(__s, __pos, traits_type::length(__s));
1837 return this->
find_first_of(__s, __pos, traits_type::length(__s));
1854 {
return this->
find(__c, __pos); }
1901 return this->
find_last_of(__s, __pos, traits_type::length(__s));
1918 {
return this->
rfind(__c, __pos); }
2081 if (this->_M_compare(__str))
2085 const size_type __osize = __str.
size();
2088 int __r = traits_type::compare(this->_M_data(), __str.
data(), __len);
2090 __r = this->_S_compare(__size, __osize);
2222 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2223 template <
typename,
typename,
typename>
class _Base>
2234 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2235 template <
typename,
typename,
typename>
class _Base>
2246 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2247 template <
typename,
typename,
typename>
class _Base>
2258 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2259 template <
typename,
typename,
typename>
class _Base>
2262 const _CharT* __rhs);
2270 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2271 template <
typename,
typename,
typename>
class _Base>
2276#if __cplusplus >= 201103L
2277 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2278 template <
typename,
typename,
typename>
class _Base>
2282 {
return std::move(__lhs.append(__rhs)); }
2284 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2285 template <
typename,
typename,
typename>
class _Base>
2286 inline __versa_string<_CharT, _Traits, _Alloc, _Base>
2289 {
return std::move(__rhs.insert(0, __lhs)); }
2291 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2292 template <
typename,
typename,
typename>
class _Base>
2293 inline __versa_string<_CharT, _Traits, _Alloc, _Base>
2297 const auto __size = __lhs.size() + __rhs.size();
2298 const bool __cond = (__size > __lhs.capacity()
2299 && __size <= __rhs.capacity());
2300 return __cond ?
std::move(__rhs.insert(0, __lhs))
2304 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2305 template <
typename,
typename,
typename>
class _Base>
2306 inline __versa_string<_CharT, _Traits, _Alloc, _Base>
2309 {
return std::move(__rhs.insert(0, __lhs)); }
2311 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2312 template <
typename,
typename,
typename>
class _Base>
2313 inline __versa_string<_CharT, _Traits, _Alloc, _Base>
2316 {
return std::move(__rhs.insert(0, 1, __lhs)); }
2318 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2319 template <
typename,
typename,
typename>
class _Base>
2320 inline __versa_string<_CharT, _Traits, _Alloc, _Base>
2322 const _CharT* __rhs)
2323 {
return std::move(__lhs.append(__rhs)); }
2325 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2326 template <
typename,
typename,
typename>
class _Base>
2327 inline __versa_string<_CharT, _Traits, _Alloc, _Base>
2330 {
return std::move(__lhs.append(1, __rhs)); }
2340 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2341 template <
typename,
typename,
typename>
class _Base>
2346 return __lhs.
size() == __rhs.
size()
2347 && !_Traits::compare(__lhs.
data(), __rhs.
data(), __lhs.
size());
2356 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2357 template <
typename,
typename,
typename>
class _Base>
2360 const _CharT* __rhs)
2362 return __lhs.
size() == _Traits::length(__rhs)
2363 && !_Traits::compare(__lhs.
data(), __rhs, __lhs.
size());
2372 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2373 template <
typename,
typename,
typename>
class _Base>
2377 {
return __rhs == __lhs; }
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>
2404 {
return !(__rhs == __lhs); }
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>
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>
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>
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>
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); }
2612 template<
typename _CharT,
typename _Traits,
typename _Alloc,
2613 template <
typename,
typename,
typename>
class _Base>
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>&
2684#if __cplusplus >= 201103L
2692#if _GLIBCXX_USE_C99_STDLIB
2704 inline unsigned long
2714 inline unsigned long long
2733#if _GLIBCXX_USE_C99_STDIO
2745 4 *
sizeof(
unsigned),
2757 4 *
sizeof(
unsigned long),
2764 4 *
sizeof(
long long),
2770 4 *
sizeof(
unsigned long long),
2798#if defined(_GLIBCXX_USE_WCHAR_T) && _GLIBCXX_USE_C99_WCHAR
2809 inline unsigned long
2819 inline unsigned long long
2837#ifndef _GLIBCXX_HAVE_BROKEN_VSWPRINTF
2848 4 *
sizeof(
unsigned),
2860 4 *
sizeof(
unsigned long),
2866 4 *
sizeof(
long long),
2872 4 *
sizeof(
unsigned long long),
2906#if __cplusplus >= 201103L
2917 :
public __hash_base<size_t, __gnu_cxx::__vstring>
2927 :
public __hash_base<size_t, __gnu_cxx::__wvstring>
2932 __s.length() *
sizeof(
wchar_t)); }
2938 :
public __hash_base<size_t, __gnu_cxx::__u16vstring>
2943 __s.length() *
sizeof(
char16_t)); }
2949 :
public __hash_base<size_t, __gnu_cxx::__u32vstring>
2954 __s.length() *
sizeof(
char32_t)); }
#define _GLIBCXX_VISIBILITY(V)
#define __glibcxx_assert(cond)
#define _GLIBCXX_NODISCARD
#define _GLIBCXX_END_NAMESPACE_VERSION
#define _GLIBCXX_BEGIN_NAMESPACE_VERSION
#define _GLIBCXX_DEBUG_PEDASSERT(_Condition)
#define __glibcxx_requires_string(_String)
#define __glibcxx_requires_string_len(_String, _Len)
#define __glibcxx_requires_valid_range(_First, _Last)
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.
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.
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.
void __throw_out_of_range_fmt(const char *,...)
__enable_if_t< is_convertible< __iter_category_t< _InIter >, input_iterator_tag >::value > _RequireInputIter
void __throw_length_error(const char *)
ISO C++ entities toplevel namespace is std.
bool operator<(const character< _Value, _Int, _St > &lhs, const character< _Value, _Int, _St > &rhs)
float stof(const __vstring &__str, std::size_t *__idx=0)
long long stoll(const __vstring &__str, std::size_t *__idx=0, int __base=10)
int stoi(const __vstring &__str, std::size_t *__idx=0, int __base=10)
unsigned long long stoull(const __vstring &__str, std::size_t *__idx, int __base=10)
long double stold(const __vstring &__str, std::size_t *__idx=0)
void swap(hashtable< _Val, _Key, _HF, _Extract, _EqKey, _All > &__ht1, hashtable< _Val, _Key, _HF, _Extract, _EqKey, _All > &__ht2)
__vstring to_string(int __val)
__versa_string< char > __vstring
bool operator>=(const _Pointer_adapter< _Tp1 > &__lhs, _Tp2 __rhs)
long stol(const __vstring &__str, std::size_t *__idx=0, int __base=10)
_Ret __stoa(_TRet(*__convf)(const _CharT *, _CharT **, _Base...), const char *__name, const _CharT *__str, std::size_t *__idx, _Base... __base)
bool operator==(const hashtable< _Val, _Key, _HF, _Ex, _Eq, _All > &__ht1, const hashtable< _Val, _Key, _HF, _Ex, _Eq, _All > &__ht2)
bool operator>(const _Pointer_adapter< _Tp1 > &__lhs, _Tp2 __rhs)
bool operator!=(const hashtable< _Val, _Key, _HF, _Ex, _Eq, _All > &__ht1, const hashtable< _Val, _Key, _HF, _Ex, _Eq, _All > &__ht2)
double stod(const __vstring &__str, std::size_t *__idx=0)
_String __to_xstring(int(*__convf)(_CharT *, std::size_t, const _CharT *, __builtin_va_list), std::size_t __n, const _CharT *__fmt,...)
__versa_string< char32_t > __u32vstring
unsigned long stoul(const __vstring &__str, std::size_t *__idx=0, int __base=10)
__versa_string< char16_t > __u16vstring
throw_value_base< _Cond > operator+(const throw_value_base< _Cond > &__a, const throw_value_base< _Cond > &__b)
__versa_string< wchar_t > __wvstring
bool operator<=(const _Pointer_adapter< _Tp1 > &__lhs, _Tp2 __rhs)
__wvstring to_wstring(int __val)
GNU extensions for public use.
constexpr const_iterator end() const noexcept
constexpr const_iterator begin() const noexcept
char_type widen(char __c) const
Widens characters.
Template class basic_istream.
Template class basic_ostream.
Primary class template hash.
static size_t hash(const void *__ptr, size_t __clength, size_t __seed=static_cast< size_t >(0xc70f6907UL))
One of the comparison functors.
constexpr const _Iterator & base() const noexcept
_Base_type::pointer pointer
_Base_type::const_pointer const_pointer
Uniform interface to C++98 and C++11 allocators.
__versa_string & assign(const _CharT *__s)
Set value to contents of a C string.
int compare(size_type __pos, size_type __n1, const _CharT *__s) const
Compare substring to a C string.
void swap(__versa_string &__s) noexcept
Swap contents with another string.
__gnu_cxx::__normal_iterator< pointer, __versa_string > iterator
reverse_iterator rend() noexcept
iterator begin() noexcept
__versa_string & replace(size_type __pos, size_type __n1, const _CharT *__s)
Replace characters with value of a C string.
size_type _M_limit(size_type __pos, size_type __off) const noexcept
_Base< _CharT, _Traits, _Alloc > __vstring_base
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.
__versa_string & insert(size_type __pos1, const __versa_string &__str)
Insert value of a 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 & replace(size_type __pos, size_type __n1, const _CharT *__s, size_type __n2)
Replace characters with value of a C substring.
__versa_string & _M_append(const _CharT *__s, size_type __n)
__vstring_base::_CharT_alloc_type _CharT_alloc_type
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.
__versa_string & insert(size_type __pos, size_type __n, _CharT __c)
Insert multiple characters.
const_reference at(size_type __n) const
Provides access to the data contained in the string.
__versa_string & replace(const_iterator __i1, const_iterator __i2, const _CharT *__s)
Replace range of characters with C string.
__versa_string & _M_replace_dispatch(const_iterator __i1, const_iterator __i2, _Integer __n, _Integer __val, std::__true_type)
static const size_type npos
__versa_string & operator=(_CharT __c)
Set value to string of length 1.
size_type find_first_of(_CharT __c, size_type __pos=0) const noexcept
Find position of a character.
const value_type & const_reference
size_type find_first_not_of(const _CharT *__s, size_type __pos, size_type __n) const
Find position of a character not in C substring.
const_reference front() const noexcept
size_type find_last_not_of(_CharT __c, size_type __pos=npos) const noexcept
Find last position of a different character.
__versa_string & _M_replace(size_type __pos, size_type __len1, const _CharT *__s, const size_type __len2)
__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.
_CharT_alloc_type::difference_type difference_type
_CharT_alloc_traits::pointer pointer
__versa_string & operator+=(const _CharT *__s)
Append a C string.
__versa_string & replace(const_iterator __i1, const_iterator __i2, _CharT *__k1, _CharT *__k2)
__versa_string & append(std::initializer_list< _CharT > __l)
Append an initializer_list of characters.
int compare(const _CharT *__s) const
Compare to a C string.
__versa_string & append(_InputIterator __first, _InputIterator __last)
Append a range of characters.
__versa_string & operator=(const __versa_string &__str)
Assign the value of str to this string.
size_type find_last_not_of(const __versa_string &__str, size_type __pos=npos) const noexcept
const_iterator cend() const noexcept
__versa_string & operator+=(const __versa_string &__str)
Append a string to this string.
__versa_string & insert(size_type __pos, const _CharT *__s, size_type __n)
Insert a C substring.
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 & replace(const_iterator __i1, const_iterator __i2, size_type __n, _CharT __c)
Replace range of characters with multiple characters.
__versa_string & append(const _CharT *__s, size_type __n)
Append a C substring.
__versa_string & replace(const_iterator __i1, const_iterator __i2, iterator __k1, iterator __k2)
__versa_string & append(const __versa_string &__str, size_type __pos, size_type __n)
Append a substring.
__versa_string(const _Alloc &__a=_Alloc()) noexcept
Construct an empty string using allocator a.
__versa_string & append(const __versa_string &__str)
Append a string to this string.
std::reverse_iterator< iterator > reverse_iterator
void _M_check_length(size_type __n1, size_type __n2, const char *__s) const
_Traits::char_type value_type
size_type find(const __versa_string &__str, size_type __pos=0) const noexcept
Find position of a string.
size_type find(_CharT __c, size_type __pos=0) const noexcept
Find position of a character.
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.
size_type rfind(_CharT __c, size_type __pos=npos) const noexcept
Find last position of a character.
__versa_string(std::initializer_list< _CharT > __l, const _Alloc &__a=_Alloc())
Construct string from an initializer list.
__versa_string & operator+=(_CharT __c)
Append a character.
void resize(size_type __n, _CharT __c)
Resizes the string to the specified number of characters.
__versa_string & assign(const __versa_string &__str)
Set value to contents of another string.
__alloc_traits< _CharT_alloc_type > _CharT_alloc_traits
std::reverse_iterator< const_iterator > const_reverse_iterator
__versa_string & operator=(const _CharT *__s)
Copy contents of __s into this string.
allocator_type get_allocator() const noexcept
Return copy of allocator used to construct this string.
int compare(size_type __pos1, size_type __n1, const __versa_string &__str, size_type __pos2, size_type __n2) const
Compare substring to a substring.
__versa_string & assign(__versa_string &&__str) noexcept
Set value to contents of another string.
iterator erase(const_iterator __position)
Remove one character.
size_type capacity() const noexcept
__versa_string & assign(const __versa_string &__str, size_type __pos, size_type __n)
Set value to a substring of a string.
int compare(size_type __pos, size_type __n1, const _CharT *__s, size_type __n2) const
Compare substring against a character array.
__versa_string & operator=(std::initializer_list< _CharT > __l)
Set value to string constructed from initializer list.
iterator insert(const_iterator __p, std::initializer_list< _CharT > __l)
Insert an initializer_list of characters.
size_type _M_check(size_type __pos, const char *__s) const
size_type find_last_not_of(const _CharT *__s, size_type __pos, size_type __n) const
Find last position of a character not in C substring.
__versa_string & replace(const_iterator __i1, const_iterator __i2, const _CharT *__s, size_type __n)
Replace range of characters with C substring.
__versa_string & _M_replace_dispatch(const_iterator __i1, const_iterator __i2, _InputIterator __k1, _InputIterator __k2, std::__false_type)
~__versa_string() noexcept
Destroy the string instance.
reference back() noexcept
size_type rfind(const _CharT *__s, size_type __pos, size_type __n) const
Find last position of 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
size_type size() const noexcept
Returns the number of characters in the string, not including any null-termination.
const _CharT * c_str() const noexcept
Return const pointer to null-terminated contents.
const _CharT * data() const noexcept
Return const pointer to contents.
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(size_type __n, _CharT __c, const _Alloc &__a=_Alloc())
Construct string as multiple characters.
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 & insert(size_type __pos1, const __versa_string &__str, size_type __pos2, size_type __n)
Insert a substring.
__versa_string & replace(const_iterator __i1, const_iterator __i2, const_iterator __k1, const_iterator __k2)
size_type find_first_not_of(_CharT __c, size_type __pos=0) const noexcept
Find position of a different character.
const_reference back() const noexcept
__versa_string & replace(const_iterator __i1, const_iterator __i2, const _CharT *__k1, const _CharT *__k2)
__versa_string & insert(size_type __pos, const _CharT *__s)
Insert a C string.
void resize(size_type __n)
Resizes the string to the specified number of characters.
const_reverse_iterator crbegin() const noexcept
const_iterator begin() const noexcept
const_reverse_iterator rend() const noexcept
_CharT_alloc_traits::const_pointer const_pointer
const_reference operator[](size_type __pos) const noexcept
Subscript access to the data contained in the string.
__versa_string substr(size_type __pos=0, size_type __n=npos) const
Get a substring.
_CharT_alloc_type::size_type size_type
__versa_string(const _CharT *__s, const _Alloc &__a=_Alloc())
Construct string as copy of a C string.
__versa_string & assign(size_type __n, _CharT __c)
Set value to multiple characters.
__gnu_cxx::__normal_iterator< const_pointer, __versa_string > const_iterator
__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 & replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
Replace characters with multiple characters.
iterator _M_iend() const noexcept
bool _M_disjunct(const _CharT *__s) const noexcept
__versa_string & erase(size_type __pos=0, size_type __n=npos)
Remove characters.
__versa_string & append(size_type __n, _CharT __c)
Append multiple characters.
int compare(size_type __pos, size_type __n, const __versa_string &__str) const
Compare substring to a string.
__versa_string & append(const _CharT *__s)
Append a C string.
size_type max_size() const noexcept
Returns the size() of the largest possible string.
size_type find_first_of(const _CharT *__s, size_type __pos, size_type __n) const
Find position of a character of C substring.
const_iterator end() const noexcept
__versa_string & assign(_InputIterator __first, _InputIterator __last)
Set value to a range of characters.
const_iterator cbegin() const noexcept
__versa_string & assign(std::initializer_list< _CharT > __l)
Set value to an initializer_list of characters.
__versa_string & replace(const_iterator __i1, const_iterator __i2, const __versa_string &__str)
Replace range of characters with string.
__versa_string & replace(const_iterator __i1, const_iterator __i2, std::initializer_list< _CharT > __l)
Replace range of characters with initializer_list.
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 & _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, _CharT __c)
__versa_string & operator=(__versa_string &&__str) noexcept
String move assignment operator.
size_type find_first_of(const _CharT *__s, size_type __pos=0) const
Find position of a character of C string.
size_type find_last_of(const _CharT *__s, size_type __pos, size_type __n) const
Find last position of a character of C substring.
iterator insert(const_iterator __p, size_type __n, _CharT __c)
Insert multiple characters.
void push_back(_CharT __c)
Append a single character.
__versa_string & operator+=(std::initializer_list< _CharT > __l)
Append an initializer_list of characters.
size_type find_last_of(_CharT __c, size_type __pos=npos) const noexcept
Find last position of a character.
reference front() noexcept
__versa_string & replace(size_type __pos, size_type __n, const __versa_string &__str)
Replace characters with value from another string.
__versa_string(const __versa_string &__str)
Construct string with copy of value of __str.
void reserve(size_type __res_arg=0)
Attempt to preallocate enough memory for specified number of characters.
__versa_string & assign(const _CharT *__s, size_type __n)
Set value to a C substring.
size_type rfind(const __versa_string &__str, size_type __pos=npos) const noexcept
const_reverse_iterator crend() const noexcept
void pop_back()
Remove the last character.
__versa_string & replace(const_iterator __i1, const_iterator __i2, _InputIterator __k1, _InputIterator __k2)
Replace range of characters with range.
reverse_iterator rbegin() noexcept
size_type find(const _CharT *__s, size_type __pos=0) const
Find position of a C string.
iterator _M_ibegin() const noexcept
Template class __versa_string.
size_t operator()(const __gnu_cxx::__vstring &__s) const noexcept
size_t operator()(const __gnu_cxx::__wvstring &__s) const noexcept
size_t operator()(const __gnu_cxx::__u16vstring &__s) const noexcept
size_t operator()(const __gnu_cxx::__u32vstring &__s) const noexcept