You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6962 lines
853 KiB
6962 lines
853 KiB
3 years ago
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
|
|
||
|
<html lang="en">
|
||
|
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||
|
<title>LCOV - test.info - 9/bits/basic_string.h</title>
|
||
|
<link rel="stylesheet" type="text/css" href="../../gcov.css">
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
|
||
|
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||
|
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||
|
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
|
||
|
|
||
|
<tr>
|
||
|
<td width="100%">
|
||
|
<table cellpadding=1 border=0 width="100%">
|
||
|
<tr>
|
||
|
<td width="10%" class="headerItem">Current view:</td>
|
||
|
<td width="35%" class="headerValue"><a href="../../index.html">top level</a> - <a href="index.html">9/bits</a> - basic_string.h<span style="font-size: 80%;"> (source / <a href="basic_string.h.func-sort-c.html">functions</a>)</span></td>
|
||
|
<td width="5%"></td>
|
||
|
<td width="15%"></td>
|
||
|
<td width="10%" class="headerCovTableHead">Hit</td>
|
||
|
<td width="10%" class="headerCovTableHead">Total</td>
|
||
|
<td width="15%" class="headerCovTableHead">Coverage</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="headerItem">Test:</td>
|
||
|
<td class="headerValue">test.info</td>
|
||
|
<td></td>
|
||
|
<td class="headerItem">Lines:</td>
|
||
|
<td class="headerCovTableEntry">11</td>
|
||
|
<td class="headerCovTableEntry">11</td>
|
||
|
<td class="headerCovTableEntryHi">100.0 %</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="headerItem">Date:</td>
|
||
|
<td class="headerValue">2022-06-07 00:30:42</td>
|
||
|
<td></td>
|
||
|
<td class="headerItem">Functions:</td>
|
||
|
<td class="headerCovTableEntry">4</td>
|
||
|
<td class="headerCovTableEntry">6</td>
|
||
|
<td class="headerCovTableEntryLo">66.7 %</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td class="headerItem">Branches:</td>
|
||
|
<td class="headerCovTableEntry">3</td>
|
||
|
<td class="headerCovTableEntry">6</td>
|
||
|
<td class="headerCovTableEntryLo">50.0 %</td>
|
||
|
</tr>
|
||
|
<tr><td><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
|
||
|
</table>
|
||
|
|
||
|
<table cellpadding=0 cellspacing=0 border=0>
|
||
|
<tr>
|
||
|
<td><br></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>
|
||
|
<pre class="sourceHeading"> Branch data Line data Source code</pre>
|
||
|
<pre class="source">
|
||
|
<a name="1"><span class="lineNum"> 1 </span> : : // Components for manipulating sequences of characters -*- C++ -*-</a>
|
||
|
<a name="2"><span class="lineNum"> 2 </span> : : </a>
|
||
|
<a name="3"><span class="lineNum"> 3 </span> : : // Copyright (C) 1997-2019 Free Software Foundation, Inc.</a>
|
||
|
<a name="4"><span class="lineNum"> 4 </span> : : //</a>
|
||
|
<a name="5"><span class="lineNum"> 5 </span> : : // This file is part of the GNU ISO C++ Library. This library is free</a>
|
||
|
<a name="6"><span class="lineNum"> 6 </span> : : // software; you can redistribute it and/or modify it under the</a>
|
||
|
<a name="7"><span class="lineNum"> 7 </span> : : // terms of the GNU General Public License as published by the</a>
|
||
|
<a name="8"><span class="lineNum"> 8 </span> : : // Free Software Foundation; either version 3, or (at your option)</a>
|
||
|
<a name="9"><span class="lineNum"> 9 </span> : : // any later version.</a>
|
||
|
<a name="10"><span class="lineNum"> 10 </span> : : </a>
|
||
|
<a name="11"><span class="lineNum"> 11 </span> : : // This library is distributed in the hope that it will be useful,</a>
|
||
|
<a name="12"><span class="lineNum"> 12 </span> : : // but WITHOUT ANY WARRANTY; without even the implied warranty of</a>
|
||
|
<a name="13"><span class="lineNum"> 13 </span> : : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</a>
|
||
|
<a name="14"><span class="lineNum"> 14 </span> : : // GNU General Public License for more details.</a>
|
||
|
<a name="15"><span class="lineNum"> 15 </span> : : </a>
|
||
|
<a name="16"><span class="lineNum"> 16 </span> : : // Under Section 7 of GPL version 3, you are granted additional</a>
|
||
|
<a name="17"><span class="lineNum"> 17 </span> : : // permissions described in the GCC Runtime Library Exception, version</a>
|
||
|
<a name="18"><span class="lineNum"> 18 </span> : : // 3.1, as published by the Free Software Foundation.</a>
|
||
|
<a name="19"><span class="lineNum"> 19 </span> : : </a>
|
||
|
<a name="20"><span class="lineNum"> 20 </span> : : // You should have received a copy of the GNU General Public License and</a>
|
||
|
<a name="21"><span class="lineNum"> 21 </span> : : // a copy of the GCC Runtime Library Exception along with this program;</a>
|
||
|
<a name="22"><span class="lineNum"> 22 </span> : : // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see</a>
|
||
|
<a name="23"><span class="lineNum"> 23 </span> : : // <http://www.gnu.org/licenses/>.</a>
|
||
|
<a name="24"><span class="lineNum"> 24 </span> : : </a>
|
||
|
<a name="25"><span class="lineNum"> 25 </span> : : /** @file bits/basic_string.h</a>
|
||
|
<a name="26"><span class="lineNum"> 26 </span> : : * This is an internal header file, included by other library headers.</a>
|
||
|
<a name="27"><span class="lineNum"> 27 </span> : : * Do not attempt to use it directly. @headername{string}</a>
|
||
|
<a name="28"><span class="lineNum"> 28 </span> : : */</a>
|
||
|
<a name="29"><span class="lineNum"> 29 </span> : : </a>
|
||
|
<a name="30"><span class="lineNum"> 30 </span> : : //</a>
|
||
|
<a name="31"><span class="lineNum"> 31 </span> : : // ISO C++ 14882: 21 Strings library</a>
|
||
|
<a name="32"><span class="lineNum"> 32 </span> : : //</a>
|
||
|
<a name="33"><span class="lineNum"> 33 </span> : : </a>
|
||
|
<a name="34"><span class="lineNum"> 34 </span> : : #ifndef _BASIC_STRING_H</a>
|
||
|
<a name="35"><span class="lineNum"> 35 </span> : : #define _BASIC_STRING_H 1</a>
|
||
|
<a name="36"><span class="lineNum"> 36 </span> : : </a>
|
||
|
<a name="37"><span class="lineNum"> 37 </span> : : #pragma GCC system_header</a>
|
||
|
<a name="38"><span class="lineNum"> 38 </span> : : </a>
|
||
|
<a name="39"><span class="lineNum"> 39 </span> : : #include <ext/atomicity.h></a>
|
||
|
<a name="40"><span class="lineNum"> 40 </span> : : #include <ext/alloc_traits.h></a>
|
||
|
<a name="41"><span class="lineNum"> 41 </span> : : #include <debug/debug.h></a>
|
||
|
<a name="42"><span class="lineNum"> 42 </span> : : </a>
|
||
|
<a name="43"><span class="lineNum"> 43 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="44"><span class="lineNum"> 44 </span> : : #include <initializer_list></a>
|
||
|
<a name="45"><span class="lineNum"> 45 </span> : : #endif</a>
|
||
|
<a name="46"><span class="lineNum"> 46 </span> : : </a>
|
||
|
<a name="47"><span class="lineNum"> 47 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="48"><span class="lineNum"> 48 </span> : : # include <string_view></a>
|
||
|
<a name="49"><span class="lineNum"> 49 </span> : : #endif</a>
|
||
|
<a name="50"><span class="lineNum"> 50 </span> : : </a>
|
||
|
<a name="51"><span class="lineNum"> 51 </span> : : namespace std _GLIBCXX_VISIBILITY(default)</a>
|
||
|
<a name="52"><span class="lineNum"> 52 </span> : : {</a>
|
||
|
<a name="53"><span class="lineNum"> 53 </span> : : _GLIBCXX_BEGIN_NAMESPACE_VERSION</a>
|
||
|
<a name="54"><span class="lineNum"> 54 </span> : : </a>
|
||
|
<a name="55"><span class="lineNum"> 55 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="56"><span class="lineNum"> 56 </span> : : // Support P0426R1 changes to char_traits in C++17.</a>
|
||
|
<a name="57"><span class="lineNum"> 57 </span> : : # define __cpp_lib_constexpr_string 201611L</a>
|
||
|
<a name="58"><span class="lineNum"> 58 </span> : : #endif</a>
|
||
|
<a name="59"><span class="lineNum"> 59 </span> : : </a>
|
||
|
<a name="60"><span class="lineNum"> 60 </span> : : #if _GLIBCXX_USE_CXX11_ABI</a>
|
||
|
<a name="61"><span class="lineNum"> 61 </span> : : _GLIBCXX_BEGIN_NAMESPACE_CXX11</a>
|
||
|
<a name="62"><span class="lineNum"> 62 </span> : : /**</a>
|
||
|
<a name="63"><span class="lineNum"> 63 </span> : : * @class basic_string basic_string.h <string></a>
|
||
|
<a name="64"><span class="lineNum"> 64 </span> : : * @brief Managing sequences of characters and character-like objects.</a>
|
||
|
<a name="65"><span class="lineNum"> 65 </span> : : *</a>
|
||
|
<a name="66"><span class="lineNum"> 66 </span> : : * @ingroup strings</a>
|
||
|
<a name="67"><span class="lineNum"> 67 </span> : : * @ingroup sequences</a>
|
||
|
<a name="68"><span class="lineNum"> 68 </span> : : *</a>
|
||
|
<a name="69"><span class="lineNum"> 69 </span> : : * @tparam _CharT Type of character</a>
|
||
|
<a name="70"><span class="lineNum"> 70 </span> : : * @tparam _Traits Traits for character type, defaults to</a>
|
||
|
<a name="71"><span class="lineNum"> 71 </span> : : * char_traits<_CharT>.</a>
|
||
|
<a name="72"><span class="lineNum"> 72 </span> : : * @tparam _Alloc Allocator type, defaults to allocator<_CharT>.</a>
|
||
|
<a name="73"><span class="lineNum"> 73 </span> : : *</a>
|
||
|
<a name="74"><span class="lineNum"> 74 </span> : : * Meets the requirements of a <a href="tables.html#65">container</a>, a</a>
|
||
|
<a name="75"><span class="lineNum"> 75 </span> : : * <a href="tables.html#66">reversible container</a>, and a</a>
|
||
|
<a name="76"><span class="lineNum"> 76 </span> : : * <a href="tables.html#67">sequence</a>. Of the</a>
|
||
|
<a name="77"><span class="lineNum"> 77 </span> : : * <a href="tables.html#68">optional sequence requirements</a>, only</a>
|
||
|
<a name="78"><span class="lineNum"> 78 </span> : : * @c push_back, @c at, and @c %array access are supported.</a>
|
||
|
<a name="79"><span class="lineNum"> 79 </span> : : */</a>
|
||
|
<a name="80"><span class="lineNum"> 80 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="81"><span class="lineNum"> 81 </span> : : class basic_string</a>
|
||
|
<a name="82"><span class="lineNum"> 82 </span> : : {</a>
|
||
|
<a name="83"><span class="lineNum"> 83 </span> : : typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template</a>
|
||
|
<a name="84"><span class="lineNum"> 84 </span> : : rebind<_CharT>::other _Char_alloc_type;</a>
|
||
|
<a name="85"><span class="lineNum"> 85 </span> : : typedef __gnu_cxx::__alloc_traits<_Char_alloc_type> _Alloc_traits;</a>
|
||
|
<a name="86"><span class="lineNum"> 86 </span> : : </a>
|
||
|
<a name="87"><span class="lineNum"> 87 </span> : : // Types:</a>
|
||
|
<a name="88"><span class="lineNum"> 88 </span> : : public:</a>
|
||
|
<a name="89"><span class="lineNum"> 89 </span> : : typedef _Traits traits_type;</a>
|
||
|
<a name="90"><span class="lineNum"> 90 </span> : : typedef typename _Traits::char_type value_type;</a>
|
||
|
<a name="91"><span class="lineNum"> 91 </span> : : typedef _Char_alloc_type allocator_type;</a>
|
||
|
<a name="92"><span class="lineNum"> 92 </span> : : typedef typename _Alloc_traits::size_type size_type;</a>
|
||
|
<a name="93"><span class="lineNum"> 93 </span> : : typedef typename _Alloc_traits::difference_type difference_type;</a>
|
||
|
<a name="94"><span class="lineNum"> 94 </span> : : typedef typename _Alloc_traits::reference reference;</a>
|
||
|
<a name="95"><span class="lineNum"> 95 </span> : : typedef typename _Alloc_traits::const_reference const_reference;</a>
|
||
|
<a name="96"><span class="lineNum"> 96 </span> : : typedef typename _Alloc_traits::pointer pointer;</a>
|
||
|
<a name="97"><span class="lineNum"> 97 </span> : : typedef typename _Alloc_traits::const_pointer const_pointer;</a>
|
||
|
<a name="98"><span class="lineNum"> 98 </span> : : typedef __gnu_cxx::__normal_iterator<pointer, basic_string> iterator;</a>
|
||
|
<a name="99"><span class="lineNum"> 99 </span> : : typedef __gnu_cxx::__normal_iterator<const_pointer, basic_string></a>
|
||
|
<a name="100"><span class="lineNum"> 100 </span> : : const_iterator;</a>
|
||
|
<a name="101"><span class="lineNum"> 101 </span> : : typedef std::reverse_iterator<const_iterator> const_reverse_iterator;</a>
|
||
|
<a name="102"><span class="lineNum"> 102 </span> : : typedef std::reverse_iterator<iterator> reverse_iterator;</a>
|
||
|
<a name="103"><span class="lineNum"> 103 </span> : : </a>
|
||
|
<a name="104"><span class="lineNum"> 104 </span> : : /// Value returned by various member functions when they fail.</a>
|
||
|
<a name="105"><span class="lineNum"> 105 </span> : : static const size_type npos = static_cast<size_type>(-1);</a>
|
||
|
<a name="106"><span class="lineNum"> 106 </span> : : </a>
|
||
|
<a name="107"><span class="lineNum"> 107 </span> : : protected:</a>
|
||
|
<a name="108"><span class="lineNum"> 108 </span> : : // type used for positions in insert, erase etc.</a>
|
||
|
<a name="109"><span class="lineNum"> 109 </span> : : #if __cplusplus < 201103L</a>
|
||
|
<a name="110"><span class="lineNum"> 110 </span> : : typedef iterator __const_iterator;</a>
|
||
|
<a name="111"><span class="lineNum"> 111 </span> : : #else</a>
|
||
|
<a name="112"><span class="lineNum"> 112 </span> : : typedef const_iterator __const_iterator;</a>
|
||
|
<a name="113"><span class="lineNum"> 113 </span> : : #endif</a>
|
||
|
<a name="114"><span class="lineNum"> 114 </span> : : </a>
|
||
|
<a name="115"><span class="lineNum"> 115 </span> : : private:</a>
|
||
|
<a name="116"><span class="lineNum"> 116 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="117"><span class="lineNum"> 117 </span> : : // A helper type for avoiding boiler-plate.</a>
|
||
|
<a name="118"><span class="lineNum"> 118 </span> : : typedef basic_string_view<_CharT, _Traits> __sv_type;</a>
|
||
|
<a name="119"><span class="lineNum"> 119 </span> : : </a>
|
||
|
<a name="120"><span class="lineNum"> 120 </span> : : template<typename _Tp, typename _Res></a>
|
||
|
<a name="121"><span class="lineNum"> 121 </span> : : using _If_sv = enable_if_t<</a>
|
||
|
<a name="122"><span class="lineNum"> 122 </span> : : __and_<is_convertible<const _Tp&, __sv_type>,</a>
|
||
|
<a name="123"><span class="lineNum"> 123 </span> : : __not_<is_convertible<const _Tp*, const basic_string*>>,</a>
|
||
|
<a name="124"><span class="lineNum"> 124 </span> : : __not_<is_convertible<const _Tp&, const _CharT*>>>::value,</a>
|
||
|
<a name="125"><span class="lineNum"> 125 </span> : : _Res>;</a>
|
||
|
<a name="126"><span class="lineNum"> 126 </span> : : </a>
|
||
|
<a name="127"><span class="lineNum"> 127 </span> : : // Allows an implicit conversion to __sv_type.</a>
|
||
|
<a name="128"><span class="lineNum"> 128 </span> : : static __sv_type</a>
|
||
|
<a name="129"><span class="lineNum"> 129 </span> : : _S_to_string_view(__sv_type __svt) noexcept</a>
|
||
|
<a name="130"><span class="lineNum"> 130 </span> : : { return __svt; }</a>
|
||
|
<a name="131"><span class="lineNum"> 131 </span> : : </a>
|
||
|
<a name="132"><span class="lineNum"> 132 </span> : : // Wraps a string_view by explicit conversion and thus</a>
|
||
|
<a name="133"><span class="lineNum"> 133 </span> : : // allows to add an internal constructor that does not</a>
|
||
|
<a name="134"><span class="lineNum"> 134 </span> : : // participate in overload resolution when a string_view</a>
|
||
|
<a name="135"><span class="lineNum"> 135 </span> : : // is provided.</a>
|
||
|
<a name="136"><span class="lineNum"> 136 </span> : : struct __sv_wrapper</a>
|
||
|
<a name="137"><span class="lineNum"> 137 </span> : : {</a>
|
||
|
<a name="138"><span class="lineNum"> 138 </span> : : explicit __sv_wrapper(__sv_type __sv) noexcept : _M_sv(__sv) { }</a>
|
||
|
<a name="139"><span class="lineNum"> 139 </span> : : __sv_type _M_sv;</a>
|
||
|
<a name="140"><span class="lineNum"> 140 </span> : : };</a>
|
||
|
<a name="141"><span class="lineNum"> 141 </span> : : </a>
|
||
|
<a name="142"><span class="lineNum"> 142 </span> : : /**</a>
|
||
|
<a name="143"><span class="lineNum"> 143 </span> : : * @brief Only internally used: Construct string from a string view</a>
|
||
|
<a name="144"><span class="lineNum"> 144 </span> : : * wrapper.</a>
|
||
|
<a name="145"><span class="lineNum"> 145 </span> : : * @param __svw string view wrapper.</a>
|
||
|
<a name="146"><span class="lineNum"> 146 </span> : : * @param __a Allocator to use.</a>
|
||
|
<a name="147"><span class="lineNum"> 147 </span> : : */</a>
|
||
|
<a name="148"><span class="lineNum"> 148 </span> : : explicit</a>
|
||
|
<a name="149"><span class="lineNum"> 149 </span> : : basic_string(__sv_wrapper __svw, const _Alloc& __a)</a>
|
||
|
<a name="150"><span class="lineNum"> 150 </span> : : : basic_string(__svw._M_sv.data(), __svw._M_sv.size(), __a) { }</a>
|
||
|
<a name="151"><span class="lineNum"> 151 </span> : : #endif</a>
|
||
|
<a name="152"><span class="lineNum"> 152 </span> : : </a>
|
||
|
<a name="153"><span class="lineNum"> 153 </span> : : // Use empty-base optimization: http://www.cantrip.org/emptyopt.html</a>
|
||
|
<a name="154"><span class="lineNum"> 154 </span> : : struct _Alloc_hider : allocator_type // TODO check __is_final</a>
|
||
|
<a name="155"><span class="lineNum"> 155 </span> : : {</a>
|
||
|
<a name="156"><span class="lineNum"> 156 </span> : : #if __cplusplus < 201103L</a>
|
||
|
<a name="157"><span class="lineNum"> 157 </span> : : _Alloc_hider(pointer __dat, const _Alloc& __a = _Alloc())</a>
|
||
|
<a name="158"><span class="lineNum"> 158 </span> : : : allocator_type(__a), _M_p(__dat) { }</a>
|
||
|
<a name="159"><span class="lineNum"> 159 </span> : : #else</a>
|
||
|
<a name="160"><span class="lineNum"> 160 </span> : : _Alloc_hider(pointer __dat, const _Alloc& __a)</a>
|
||
|
<a name="161"><span class="lineNum"> 161 </span> : : : allocator_type(__a), _M_p(__dat) { }</a>
|
||
|
<a name="162"><span class="lineNum"> 162 </span> : : </a>
|
||
|
<a name="163"><span class="lineNum"> 163 </span> : : _Alloc_hider(pointer __dat, _Alloc&& __a = _Alloc())</a>
|
||
|
<a name="164"><span class="lineNum"> 164 </span> : : : allocator_type(std::move(__a)), _M_p(__dat) { }</a>
|
||
|
<a name="165"><span class="lineNum"> 165 </span> : : #endif</a>
|
||
|
<a name="166"><span class="lineNum"> 166 </span> : : </a>
|
||
|
<a name="167"><span class="lineNum"> 167 </span> : : pointer _M_p; // The actual data.</a>
|
||
|
<a name="168"><span class="lineNum"> 168 </span> : : };</a>
|
||
|
<a name="169"><span class="lineNum"> 169 </span> : : </a>
|
||
|
<a name="170"><span class="lineNum"> 170 </span> : : _Alloc_hider _M_dataplus;</a>
|
||
|
<a name="171"><span class="lineNum"> 171 </span> : : size_type _M_string_length;</a>
|
||
|
<a name="172"><span class="lineNum"> 172 </span> : : </a>
|
||
|
<a name="173"><span class="lineNum"> 173 </span> : : enum { _S_local_capacity = 15 / sizeof(_CharT) };</a>
|
||
|
<a name="174"><span class="lineNum"> 174 </span> : : </a>
|
||
|
<a name="175"><span class="lineNum"> 175 </span> : : union</a>
|
||
|
<a name="176"><span class="lineNum"> 176 </span> : : {</a>
|
||
|
<a name="177"><span class="lineNum"> 177 </span> : : _CharT _M_local_buf[_S_local_capacity + 1];</a>
|
||
|
<a name="178"><span class="lineNum"> 178 </span> : : size_type _M_allocated_capacity;</a>
|
||
|
<a name="179"><span class="lineNum"> 179 </span> : : };</a>
|
||
|
<a name="180"><span class="lineNum"> 180 </span> : : </a>
|
||
|
<a name="181"><span class="lineNum"> 181 </span> : : void</a>
|
||
|
<a name="182"><span class="lineNum"> 182 </span> : : _M_data(pointer __p)</a>
|
||
|
<a name="183"><span class="lineNum"> 183 </span> : : { _M_dataplus._M_p = __p; }</a>
|
||
|
<a name="184"><span class="lineNum"> 184 </span> : : </a>
|
||
|
<a name="185"><span class="lineNum"> 185 </span> : : void</a>
|
||
|
<a name="186"><span class="lineNum"> 186 </span> : : _M_length(size_type __length)</a>
|
||
|
<a name="187"><span class="lineNum"> 187 </span> : : { _M_string_length = __length; }</a>
|
||
|
<a name="188"><span class="lineNum"> 188 </span> : : </a>
|
||
|
<a name="189"><span class="lineNum"> 189 </span> : : pointer</a>
|
||
|
<a name="190"><span class="lineNum"> 190 </span> : : _M_data() const</a>
|
||
|
<a name="191"><span class="lineNum"> 191 </span> : : { return _M_dataplus._M_p; }</a>
|
||
|
<a name="192"><span class="lineNum"> 192 </span> : : </a>
|
||
|
<a name="193"><span class="lineNum"> 193 </span> : : pointer</a>
|
||
|
<a name="194"><span class="lineNum"> 194 </span> : : _M_local_data()</a>
|
||
|
<a name="195"><span class="lineNum"> 195 </span> : : {</a>
|
||
|
<a name="196"><span class="lineNum"> 196 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="197"><span class="lineNum"> 197 </span> : : return std::pointer_traits<pointer>::pointer_to(*_M_local_buf);</a>
|
||
|
<a name="198"><span class="lineNum"> 198 </span> : : #else</a>
|
||
|
<a name="199"><span class="lineNum"> 199 </span> : : return pointer(_M_local_buf);</a>
|
||
|
<a name="200"><span class="lineNum"> 200 </span> : : #endif</a>
|
||
|
<a name="201"><span class="lineNum"> 201 </span> : : }</a>
|
||
|
<a name="202"><span class="lineNum"> 202 </span> : : </a>
|
||
|
<a name="203"><span class="lineNum"> 203 </span> : : const_pointer</a>
|
||
|
<a name="204"><span class="lineNum"> 204 </span> : : _M_local_data() const</a>
|
||
|
<a name="205"><span class="lineNum"> 205 </span> : : {</a>
|
||
|
<a name="206"><span class="lineNum"> 206 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="207"><span class="lineNum"> 207 </span> : : return std::pointer_traits<const_pointer>::pointer_to(*_M_local_buf);</a>
|
||
|
<a name="208"><span class="lineNum"> 208 </span> : : #else</a>
|
||
|
<a name="209"><span class="lineNum"> 209 </span> : : return const_pointer(_M_local_buf);</a>
|
||
|
<a name="210"><span class="lineNum"> 210 </span> : : #endif</a>
|
||
|
<a name="211"><span class="lineNum"> 211 </span> : : }</a>
|
||
|
<a name="212"><span class="lineNum"> 212 </span> : : </a>
|
||
|
<a name="213"><span class="lineNum"> 213 </span> : : void</a>
|
||
|
<a name="214"><span class="lineNum"> 214 </span> : : _M_capacity(size_type __capacity)</a>
|
||
|
<a name="215"><span class="lineNum"> 215 </span> : : { _M_allocated_capacity = __capacity; }</a>
|
||
|
<a name="216"><span class="lineNum"> 216 </span> : : </a>
|
||
|
<a name="217"><span class="lineNum"> 217 </span> : : void</a>
|
||
|
<a name="218"><span class="lineNum"> 218 </span> : : _M_set_length(size_type __n)</a>
|
||
|
<a name="219"><span class="lineNum"> 219 </span> : : {</a>
|
||
|
<a name="220"><span class="lineNum"> 220 </span> : : _M_length(__n);</a>
|
||
|
<a name="221"><span class="lineNum"> 221 </span> : : traits_type::assign(_M_data()[__n], _CharT());</a>
|
||
|
<a name="222"><span class="lineNum"> 222 </span> : : }</a>
|
||
|
<a name="223"><span class="lineNum"> 223 </span> : : </a>
|
||
|
<a name="224"><span class="lineNum"> 224 </span> : : bool</a>
|
||
|
<a name="225"><span class="lineNum"> 225 </span> : : _M_is_local() const</a>
|
||
|
<a name="226"><span class="lineNum"> 226 </span> : : { return _M_data() == _M_local_data(); }</a>
|
||
|
<a name="227"><span class="lineNum"> 227 </span> : : </a>
|
||
|
<a name="228"><span class="lineNum"> 228 </span> : : // Create & Destroy</a>
|
||
|
<a name="229"><span class="lineNum"> 229 </span> : : pointer</a>
|
||
|
<a name="230"><span class="lineNum"> 230 </span> : : _M_create(size_type&, size_type);</a>
|
||
|
<a name="231"><span class="lineNum"> 231 </span> : : </a>
|
||
|
<a name="232"><span class="lineNum"> 232 </span> : : void</a>
|
||
|
<a name="233"><span class="lineNum"> 233 </span> : : _M_dispose()</a>
|
||
|
<a name="234"><span class="lineNum"> 234 </span> : : {</a>
|
||
|
<a name="235"><span class="lineNum"> 235 </span> : : if (!_M_is_local())</a>
|
||
|
<a name="236"><span class="lineNum"> 236 </span> : : _M_destroy(_M_allocated_capacity);</a>
|
||
|
<a name="237"><span class="lineNum"> 237 </span> : : }</a>
|
||
|
<a name="238"><span class="lineNum"> 238 </span> : : </a>
|
||
|
<a name="239"><span class="lineNum"> 239 </span> : : void</a>
|
||
|
<a name="240"><span class="lineNum"> 240 </span> : : _M_destroy(size_type __size) throw()</a>
|
||
|
<a name="241"><span class="lineNum"> 241 </span> : : { _Alloc_traits::deallocate(_M_get_allocator(), _M_data(), __size + 1); }</a>
|
||
|
<a name="242"><span class="lineNum"> 242 </span> : : </a>
|
||
|
<a name="243"><span class="lineNum"> 243 </span> : : // _M_construct_aux is used to implement the 21.3.1 para 15 which</a>
|
||
|
<a name="244"><span class="lineNum"> 244 </span> : : // requires special behaviour if _InIterator is an integral type</a>
|
||
|
<a name="245"><span class="lineNum"> 245 </span> : : template<typename _InIterator></a>
|
||
|
<a name="246"><span class="lineNum"> 246 </span> : : void</a>
|
||
|
<a name="247"><span class="lineNum"> 247 </span> :<span class="lineCov"> 25 : _M_construct_aux(_InIterator __beg, _InIterator __end,</span></a>
|
||
|
<a name="248"><span class="lineNum"> 248 </span> : : std::__false_type)</a>
|
||
|
<a name="249"><span class="lineNum"> 249 </span> : : {</a>
|
||
|
<a name="250"><span class="lineNum"> 250 </span> : : typedef typename iterator_traits<_InIterator>::iterator_category _Tag;</a>
|
||
|
<a name="251"><span class="lineNum"> 251 </span> [<span class="branchCov" title="Branch 0 was taken 25 times"> + </span><span class="branchNoCov" title="Branch 1 was not taken"> - </span>]:<span class="lineCov"> 25 : _M_construct(__beg, __end, _Tag());</span></a>
|
||
|
<a name="252"><span class="lineNum"> 252 </span> :<span class="lineCov"> 25 : }</span></a>
|
||
|
<a name="253"><span class="lineNum"> 253 </span> : : </a>
|
||
|
<a name="254"><span class="lineNum"> 254 </span> : : // _GLIBCXX_RESOLVE_LIB_DEFECTS</a>
|
||
|
<a name="255"><span class="lineNum"> 255 </span> : : // 438. Ambiguity in the "do the right thing" clause</a>
|
||
|
<a name="256"><span class="lineNum"> 256 </span> : : template<typename _Integer></a>
|
||
|
<a name="257"><span class="lineNum"> 257 </span> : : void</a>
|
||
|
<a name="258"><span class="lineNum"> 258 </span> : : _M_construct_aux(_Integer __beg, _Integer __end, std::__true_type)</a>
|
||
|
<a name="259"><span class="lineNum"> 259 </span> : : { _M_construct_aux_2(static_cast<size_type>(__beg), __end); }</a>
|
||
|
<a name="260"><span class="lineNum"> 260 </span> : : </a>
|
||
|
<a name="261"><span class="lineNum"> 261 </span> : : void</a>
|
||
|
<a name="262"><span class="lineNum"> 262 </span> : : _M_construct_aux_2(size_type __req, _CharT __c)</a>
|
||
|
<a name="263"><span class="lineNum"> 263 </span> : : { _M_construct(__req, __c); }</a>
|
||
|
<a name="264"><span class="lineNum"> 264 </span> : : </a>
|
||
|
<a name="265"><span class="lineNum"> 265 </span> : : template<typename _InIterator></a>
|
||
|
<a name="266"><span class="lineNum"> 266 </span> : : void</a>
|
||
|
<a name="267"><span class="lineNum"> 267 </span> :<span class="lineCov"> 25 : _M_construct(_InIterator __beg, _InIterator __end)</span></a>
|
||
|
<a name="268"><span class="lineNum"> 268 </span> : : {</a>
|
||
|
<a name="269"><span class="lineNum"> 269 </span> : : typedef typename std::__is_integer<_InIterator>::__type _Integral;</a>
|
||
|
<a name="270"><span class="lineNum"> 270 </span> [<span class="branchCov" title="Branch 0 was taken 25 times"> + </span><span class="branchNoCov" title="Branch 1 was not taken"> - </span>]:<span class="lineCov"> 25 : _M_construct_aux(__beg, __end, _Integral());</span></a>
|
||
|
<a name="271"><span class="lineNum"> 271 </span> :<span class="lineCov"> 25 : }</span></a>
|
||
|
<a name="272"><span class="lineNum"> 272 </span> : : </a>
|
||
|
<a name="273"><span class="lineNum"> 273 </span> : : // For Input Iterators, used in istreambuf_iterators, etc.</a>
|
||
|
<a name="274"><span class="lineNum"> 274 </span> : : template<typename _InIterator></a>
|
||
|
<a name="275"><span class="lineNum"> 275 </span> : : void</a>
|
||
|
<a name="276"><span class="lineNum"> 276 </span> : : _M_construct(_InIterator __beg, _InIterator __end,</a>
|
||
|
<a name="277"><span class="lineNum"> 277 </span> : : std::input_iterator_tag);</a>
|
||
|
<a name="278"><span class="lineNum"> 278 </span> : : </a>
|
||
|
<a name="279"><span class="lineNum"> 279 </span> : : // For forward_iterators up to random_access_iterators, used for</a>
|
||
|
<a name="280"><span class="lineNum"> 280 </span> : : // string::iterator, _CharT*, etc.</a>
|
||
|
<a name="281"><span class="lineNum"> 281 </span> : : template<typename _FwdIterator></a>
|
||
|
<a name="282"><span class="lineNum"> 282 </span> : : void</a>
|
||
|
<a name="283"><span class="lineNum"> 283 </span> : : _M_construct(_FwdIterator __beg, _FwdIterator __end,</a>
|
||
|
<a name="284"><span class="lineNum"> 284 </span> : : std::forward_iterator_tag);</a>
|
||
|
<a name="285"><span class="lineNum"> 285 </span> : : </a>
|
||
|
<a name="286"><span class="lineNum"> 286 </span> : : void</a>
|
||
|
<a name="287"><span class="lineNum"> 287 </span> : : _M_construct(size_type __req, _CharT __c);</a>
|
||
|
<a name="288"><span class="lineNum"> 288 </span> : : </a>
|
||
|
<a name="289"><span class="lineNum"> 289 </span> : : allocator_type&</a>
|
||
|
<a name="290"><span class="lineNum"> 290 </span> : : _M_get_allocator()</a>
|
||
|
<a name="291"><span class="lineNum"> 291 </span> : : { return _M_dataplus; }</a>
|
||
|
<a name="292"><span class="lineNum"> 292 </span> : : </a>
|
||
|
<a name="293"><span class="lineNum"> 293 </span> : : const allocator_type&</a>
|
||
|
<a name="294"><span class="lineNum"> 294 </span> : : _M_get_allocator() const</a>
|
||
|
<a name="295"><span class="lineNum"> 295 </span> : : { return _M_dataplus; }</a>
|
||
|
<a name="296"><span class="lineNum"> 296 </span> : : </a>
|
||
|
<a name="297"><span class="lineNum"> 297 </span> : : private:</a>
|
||
|
<a name="298"><span class="lineNum"> 298 </span> : : </a>
|
||
|
<a name="299"><span class="lineNum"> 299 </span> : : #ifdef _GLIBCXX_DISAMBIGUATE_REPLACE_INST</a>
|
||
|
<a name="300"><span class="lineNum"> 300 </span> : : // The explicit instantiations in misc-inst.cc require this due to</a>
|
||
|
<a name="301"><span class="lineNum"> 301 </span> : : // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64063</a>
|
||
|
<a name="302"><span class="lineNum"> 302 </span> : : template<typename _Tp, bool _Requires =</a>
|
||
|
<a name="303"><span class="lineNum"> 303 </span> : : !__are_same<_Tp, _CharT*>::__value</a>
|
||
|
<a name="304"><span class="lineNum"> 304 </span> : : && !__are_same<_Tp, const _CharT*>::__value</a>
|
||
|
<a name="305"><span class="lineNum"> 305 </span> : : && !__are_same<_Tp, iterator>::__value</a>
|
||
|
<a name="306"><span class="lineNum"> 306 </span> : : && !__are_same<_Tp, const_iterator>::__value></a>
|
||
|
<a name="307"><span class="lineNum"> 307 </span> : : struct __enable_if_not_native_iterator</a>
|
||
|
<a name="308"><span class="lineNum"> 308 </span> : : { typedef basic_string& __type; };</a>
|
||
|
<a name="309"><span class="lineNum"> 309 </span> : : template<typename _Tp></a>
|
||
|
<a name="310"><span class="lineNum"> 310 </span> : : struct __enable_if_not_native_iterator<_Tp, false> { };</a>
|
||
|
<a name="311"><span class="lineNum"> 311 </span> : : #endif</a>
|
||
|
<a name="312"><span class="lineNum"> 312 </span> : : </a>
|
||
|
<a name="313"><span class="lineNum"> 313 </span> : : size_type</a>
|
||
|
<a name="314"><span class="lineNum"> 314 </span> : : _M_check(size_type __pos, const char* __s) const</a>
|
||
|
<a name="315"><span class="lineNum"> 315 </span> : : {</a>
|
||
|
<a name="316"><span class="lineNum"> 316 </span> : : if (__pos > this->size())</a>
|
||
|
<a name="317"><span class="lineNum"> 317 </span> : : __throw_out_of_range_fmt(__N("%s: __pos (which is %zu) > "</a>
|
||
|
<a name="318"><span class="lineNum"> 318 </span> : : "this->size() (which is %zu)"),</a>
|
||
|
<a name="319"><span class="lineNum"> 319 </span> : : __s, __pos, this->size());</a>
|
||
|
<a name="320"><span class="lineNum"> 320 </span> : : return __pos;</a>
|
||
|
<a name="321"><span class="lineNum"> 321 </span> : : }</a>
|
||
|
<a name="322"><span class="lineNum"> 322 </span> : : </a>
|
||
|
<a name="323"><span class="lineNum"> 323 </span> : : void</a>
|
||
|
<a name="324"><span class="lineNum"> 324 </span> : : _M_check_length(size_type __n1, size_type __n2, const char* __s) const</a>
|
||
|
<a name="325"><span class="lineNum"> 325 </span> : : {</a>
|
||
|
<a name="326"><span class="lineNum"> 326 </span> : : if (this->max_size() - (this->size() - __n1) < __n2)</a>
|
||
|
<a name="327"><span class="lineNum"> 327 </span> : : __throw_length_error(__N(__s));</a>
|
||
|
<a name="328"><span class="lineNum"> 328 </span> : : }</a>
|
||
|
<a name="329"><span class="lineNum"> 329 </span> : : </a>
|
||
|
<a name="330"><span class="lineNum"> 330 </span> : : </a>
|
||
|
<a name="331"><span class="lineNum"> 331 </span> : : // NB: _M_limit doesn't check for a bad __pos value.</a>
|
||
|
<a name="332"><span class="lineNum"> 332 </span> : : size_type</a>
|
||
|
<a name="333"><span class="lineNum"> 333 </span> : : _M_limit(size_type __pos, size_type __off) const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="334"><span class="lineNum"> 334 </span> : : {</a>
|
||
|
<a name="335"><span class="lineNum"> 335 </span> : : const bool __testoff = __off < this->size() - __pos;</a>
|
||
|
<a name="336"><span class="lineNum"> 336 </span> : : return __testoff ? __off : this->size() - __pos;</a>
|
||
|
<a name="337"><span class="lineNum"> 337 </span> : : }</a>
|
||
|
<a name="338"><span class="lineNum"> 338 </span> : : </a>
|
||
|
<a name="339"><span class="lineNum"> 339 </span> : : // True if _Rep and source do not overlap.</a>
|
||
|
<a name="340"><span class="lineNum"> 340 </span> : : bool</a>
|
||
|
<a name="341"><span class="lineNum"> 341 </span> : : _M_disjunct(const _CharT* __s) const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="342"><span class="lineNum"> 342 </span> : : {</a>
|
||
|
<a name="343"><span class="lineNum"> 343 </span> : : return (less<const _CharT*>()(__s, _M_data())</a>
|
||
|
<a name="344"><span class="lineNum"> 344 </span> : : || less<const _CharT*>()(_M_data() + this->size(), __s));</a>
|
||
|
<a name="345"><span class="lineNum"> 345 </span> : : }</a>
|
||
|
<a name="346"><span class="lineNum"> 346 </span> : : </a>
|
||
|
<a name="347"><span class="lineNum"> 347 </span> : : // When __n = 1 way faster than the general multichar</a>
|
||
|
<a name="348"><span class="lineNum"> 348 </span> : : // traits_type::copy/move/assign.</a>
|
||
|
<a name="349"><span class="lineNum"> 349 </span> : : static void</a>
|
||
|
<a name="350"><span class="lineNum"> 350 </span> : : _S_copy(_CharT* __d, const _CharT* __s, size_type __n)</a>
|
||
|
<a name="351"><span class="lineNum"> 351 </span> : : {</a>
|
||
|
<a name="352"><span class="lineNum"> 352 </span> : : if (__n == 1)</a>
|
||
|
<a name="353"><span class="lineNum"> 353 </span> : : traits_type::assign(*__d, *__s);</a>
|
||
|
<a name="354"><span class="lineNum"> 354 </span> : : else</a>
|
||
|
<a name="355"><span class="lineNum"> 355 </span> : : traits_type::copy(__d, __s, __n);</a>
|
||
|
<a name="356"><span class="lineNum"> 356 </span> : : }</a>
|
||
|
<a name="357"><span class="lineNum"> 357 </span> : : </a>
|
||
|
<a name="358"><span class="lineNum"> 358 </span> : : static void</a>
|
||
|
<a name="359"><span class="lineNum"> 359 </span> : : _S_move(_CharT* __d, const _CharT* __s, size_type __n)</a>
|
||
|
<a name="360"><span class="lineNum"> 360 </span> : : {</a>
|
||
|
<a name="361"><span class="lineNum"> 361 </span> : : if (__n == 1)</a>
|
||
|
<a name="362"><span class="lineNum"> 362 </span> : : traits_type::assign(*__d, *__s);</a>
|
||
|
<a name="363"><span class="lineNum"> 363 </span> : : else</a>
|
||
|
<a name="364"><span class="lineNum"> 364 </span> : : traits_type::move(__d, __s, __n);</a>
|
||
|
<a name="365"><span class="lineNum"> 365 </span> : : }</a>
|
||
|
<a name="366"><span class="lineNum"> 366 </span> : : </a>
|
||
|
<a name="367"><span class="lineNum"> 367 </span> : : static void</a>
|
||
|
<a name="368"><span class="lineNum"> 368 </span> : : _S_assign(_CharT* __d, size_type __n, _CharT __c)</a>
|
||
|
<a name="369"><span class="lineNum"> 369 </span> : : {</a>
|
||
|
<a name="370"><span class="lineNum"> 370 </span> : : if (__n == 1)</a>
|
||
|
<a name="371"><span class="lineNum"> 371 </span> : : traits_type::assign(*__d, __c);</a>
|
||
|
<a name="372"><span class="lineNum"> 372 </span> : : else</a>
|
||
|
<a name="373"><span class="lineNum"> 373 </span> : : traits_type::assign(__d, __n, __c);</a>
|
||
|
<a name="374"><span class="lineNum"> 374 </span> : : }</a>
|
||
|
<a name="375"><span class="lineNum"> 375 </span> : : </a>
|
||
|
<a name="376"><span class="lineNum"> 376 </span> : : // _S_copy_chars is a separate template to permit specialization</a>
|
||
|
<a name="377"><span class="lineNum"> 377 </span> : : // to optimize for the common case of pointers as iterators.</a>
|
||
|
<a name="378"><span class="lineNum"> 378 </span> : : template<class _Iterator></a>
|
||
|
<a name="379"><span class="lineNum"> 379 </span> : : static void</a>
|
||
|
<a name="380"><span class="lineNum"> 380 </span> : : _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2)</a>
|
||
|
<a name="381"><span class="lineNum"> 381 </span> : : {</a>
|
||
|
<a name="382"><span class="lineNum"> 382 </span> : : for (; __k1 != __k2; ++__k1, (void)++__p)</a>
|
||
|
<a name="383"><span class="lineNum"> 383 </span> : : traits_type::assign(*__p, *__k1); // These types are off.</a>
|
||
|
<a name="384"><span class="lineNum"> 384 </span> : : }</a>
|
||
|
<a name="385"><span class="lineNum"> 385 </span> : : </a>
|
||
|
<a name="386"><span class="lineNum"> 386 </span> : : static void</a>
|
||
|
<a name="387"><span class="lineNum"> 387 </span> : : _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="388"><span class="lineNum"> 388 </span> : : { _S_copy_chars(__p, __k1.base(), __k2.base()); }</a>
|
||
|
<a name="389"><span class="lineNum"> 389 </span> : : </a>
|
||
|
<a name="390"><span class="lineNum"> 390 </span> : : static void</a>
|
||
|
<a name="391"><span class="lineNum"> 391 </span> : : _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2)</a>
|
||
|
<a name="392"><span class="lineNum"> 392 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="393"><span class="lineNum"> 393 </span> : : { _S_copy_chars(__p, __k1.base(), __k2.base()); }</a>
|
||
|
<a name="394"><span class="lineNum"> 394 </span> : : </a>
|
||
|
<a name="395"><span class="lineNum"> 395 </span> : : static void</a>
|
||
|
<a name="396"><span class="lineNum"> 396 </span> : : _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="397"><span class="lineNum"> 397 </span> : : { _S_copy(__p, __k1, __k2 - __k1); }</a>
|
||
|
<a name="398"><span class="lineNum"> 398 </span> : : </a>
|
||
|
<a name="399"><span class="lineNum"> 399 </span> : : static void</a>
|
||
|
<a name="400"><span class="lineNum"> 400 </span> : : _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2)</a>
|
||
|
<a name="401"><span class="lineNum"> 401 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="402"><span class="lineNum"> 402 </span> : : { _S_copy(__p, __k1, __k2 - __k1); }</a>
|
||
|
<a name="403"><span class="lineNum"> 403 </span> : : </a>
|
||
|
<a name="404"><span class="lineNum"> 404 </span> : : static int</a>
|
||
|
<a name="405"><span class="lineNum"> 405 </span> : : _S_compare(size_type __n1, size_type __n2) _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="406"><span class="lineNum"> 406 </span> : : {</a>
|
||
|
<a name="407"><span class="lineNum"> 407 </span> : : const difference_type __d = difference_type(__n1 - __n2);</a>
|
||
|
<a name="408"><span class="lineNum"> 408 </span> : : </a>
|
||
|
<a name="409"><span class="lineNum"> 409 </span> : : if (__d > __gnu_cxx::__numeric_traits<int>::__max)</a>
|
||
|
<a name="410"><span class="lineNum"> 410 </span> : : return __gnu_cxx::__numeric_traits<int>::__max;</a>
|
||
|
<a name="411"><span class="lineNum"> 411 </span> : : else if (__d < __gnu_cxx::__numeric_traits<int>::__min)</a>
|
||
|
<a name="412"><span class="lineNum"> 412 </span> : : return __gnu_cxx::__numeric_traits<int>::__min;</a>
|
||
|
<a name="413"><span class="lineNum"> 413 </span> : : else</a>
|
||
|
<a name="414"><span class="lineNum"> 414 </span> : : return int(__d);</a>
|
||
|
<a name="415"><span class="lineNum"> 415 </span> : : }</a>
|
||
|
<a name="416"><span class="lineNum"> 416 </span> : : </a>
|
||
|
<a name="417"><span class="lineNum"> 417 </span> : : void</a>
|
||
|
<a name="418"><span class="lineNum"> 418 </span> : : _M_assign(const basic_string&);</a>
|
||
|
<a name="419"><span class="lineNum"> 419 </span> : : </a>
|
||
|
<a name="420"><span class="lineNum"> 420 </span> : : void</a>
|
||
|
<a name="421"><span class="lineNum"> 421 </span> : : _M_mutate(size_type __pos, size_type __len1, const _CharT* __s,</a>
|
||
|
<a name="422"><span class="lineNum"> 422 </span> : : size_type __len2);</a>
|
||
|
<a name="423"><span class="lineNum"> 423 </span> : : </a>
|
||
|
<a name="424"><span class="lineNum"> 424 </span> : : void</a>
|
||
|
<a name="425"><span class="lineNum"> 425 </span> : : _M_erase(size_type __pos, size_type __n);</a>
|
||
|
<a name="426"><span class="lineNum"> 426 </span> : : </a>
|
||
|
<a name="427"><span class="lineNum"> 427 </span> : : public:</a>
|
||
|
<a name="428"><span class="lineNum"> 428 </span> : : // Construct/copy/destroy:</a>
|
||
|
<a name="429"><span class="lineNum"> 429 </span> : : // NB: We overload ctors in some cases instead of using default</a>
|
||
|
<a name="430"><span class="lineNum"> 430 </span> : : // arguments, per 17.4.4.4 para. 2 item 2.</a>
|
||
|
<a name="431"><span class="lineNum"> 431 </span> : : </a>
|
||
|
<a name="432"><span class="lineNum"> 432 </span> : : /**</a>
|
||
|
<a name="433"><span class="lineNum"> 433 </span> : : * @brief Default constructor creates an empty string.</a>
|
||
|
<a name="434"><span class="lineNum"> 434 </span> : : */</a>
|
||
|
<a name="435"><span class="lineNum"> 435 </span> : : basic_string()</a>
|
||
|
<a name="436"><span class="lineNum"> 436 </span> : : _GLIBCXX_NOEXCEPT_IF(is_nothrow_default_constructible<_Alloc>::value)</a>
|
||
|
<a name="437"><span class="lineNum"> 437 </span> : : : _M_dataplus(_M_local_data())</a>
|
||
|
<a name="438"><span class="lineNum"> 438 </span> : : { _M_set_length(0); }</a>
|
||
|
<a name="439"><span class="lineNum"> 439 </span> : : </a>
|
||
|
<a name="440"><span class="lineNum"> 440 </span> : : /**</a>
|
||
|
<a name="441"><span class="lineNum"> 441 </span> : : * @brief Construct an empty string using allocator @a a.</a>
|
||
|
<a name="442"><span class="lineNum"> 442 </span> : : */</a>
|
||
|
<a name="443"><span class="lineNum"> 443 </span> : : explicit</a>
|
||
|
<a name="444"><span class="lineNum"> 444 </span> : : basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="445"><span class="lineNum"> 445 </span> : : : _M_dataplus(_M_local_data(), __a)</a>
|
||
|
<a name="446"><span class="lineNum"> 446 </span> : : { _M_set_length(0); }</a>
|
||
|
<a name="447"><span class="lineNum"> 447 </span> : : </a>
|
||
|
<a name="448"><span class="lineNum"> 448 </span> : : /**</a>
|
||
|
<a name="449"><span class="lineNum"> 449 </span> : : * @brief Construct string with copy of value of @a __str.</a>
|
||
|
<a name="450"><span class="lineNum"> 450 </span> : : * @param __str Source string.</a>
|
||
|
<a name="451"><span class="lineNum"> 451 </span> : : */</a>
|
||
|
<a name="452"><span class="lineNum"> 452 </span> : : basic_string(const basic_string& __str)</a>
|
||
|
<a name="453"><span class="lineNum"> 453 </span> : : : _M_dataplus(_M_local_data(),</a>
|
||
|
<a name="454"><span class="lineNum"> 454 </span> : : _Alloc_traits::_S_select_on_copy(__str._M_get_allocator()))</a>
|
||
|
<a name="455"><span class="lineNum"> 455 </span> : : { _M_construct(__str._M_data(), __str._M_data() + __str.length()); }</a>
|
||
|
<a name="456"><span class="lineNum"> 456 </span> : : </a>
|
||
|
<a name="457"><span class="lineNum"> 457 </span> : : // _GLIBCXX_RESOLVE_LIB_DEFECTS</a>
|
||
|
<a name="458"><span class="lineNum"> 458 </span> : : // 2583. no way to supply an allocator for basic_string(str, pos)</a>
|
||
|
<a name="459"><span class="lineNum"> 459 </span> : : /**</a>
|
||
|
<a name="460"><span class="lineNum"> 460 </span> : : * @brief Construct string as copy of a substring.</a>
|
||
|
<a name="461"><span class="lineNum"> 461 </span> : : * @param __str Source string.</a>
|
||
|
<a name="462"><span class="lineNum"> 462 </span> : : * @param __pos Index of first character to copy from.</a>
|
||
|
<a name="463"><span class="lineNum"> 463 </span> : : * @param __a Allocator to use.</a>
|
||
|
<a name="464"><span class="lineNum"> 464 </span> : : */</a>
|
||
|
<a name="465"><span class="lineNum"> 465 </span> : : basic_string(const basic_string& __str, size_type __pos,</a>
|
||
|
<a name="466"><span class="lineNum"> 466 </span> : : const _Alloc& __a = _Alloc())</a>
|
||
|
<a name="467"><span class="lineNum"> 467 </span> : : : _M_dataplus(_M_local_data(), __a)</a>
|
||
|
<a name="468"><span class="lineNum"> 468 </span> : : {</a>
|
||
|
<a name="469"><span class="lineNum"> 469 </span> : : const _CharT* __start = __str._M_data()</a>
|
||
|
<a name="470"><span class="lineNum"> 470 </span> : : + __str._M_check(__pos, "basic_string::basic_string");</a>
|
||
|
<a name="471"><span class="lineNum"> 471 </span> : : _M_construct(__start, __start + __str._M_limit(__pos, npos));</a>
|
||
|
<a name="472"><span class="lineNum"> 472 </span> : : }</a>
|
||
|
<a name="473"><span class="lineNum"> 473 </span> : : </a>
|
||
|
<a name="474"><span class="lineNum"> 474 </span> : : /**</a>
|
||
|
<a name="475"><span class="lineNum"> 475 </span> : : * @brief Construct string as copy of a substring.</a>
|
||
|
<a name="476"><span class="lineNum"> 476 </span> : : * @param __str Source string.</a>
|
||
|
<a name="477"><span class="lineNum"> 477 </span> : : * @param __pos Index of first character to copy from.</a>
|
||
|
<a name="478"><span class="lineNum"> 478 </span> : : * @param __n Number of characters to copy.</a>
|
||
|
<a name="479"><span class="lineNum"> 479 </span> : : */</a>
|
||
|
<a name="480"><span class="lineNum"> 480 </span> : : basic_string(const basic_string& __str, size_type __pos,</a>
|
||
|
<a name="481"><span class="lineNum"> 481 </span> : : size_type __n)</a>
|
||
|
<a name="482"><span class="lineNum"> 482 </span> : : : _M_dataplus(_M_local_data())</a>
|
||
|
<a name="483"><span class="lineNum"> 483 </span> : : {</a>
|
||
|
<a name="484"><span class="lineNum"> 484 </span> : : const _CharT* __start = __str._M_data()</a>
|
||
|
<a name="485"><span class="lineNum"> 485 </span> : : + __str._M_check(__pos, "basic_string::basic_string");</a>
|
||
|
<a name="486"><span class="lineNum"> 486 </span> : : _M_construct(__start, __start + __str._M_limit(__pos, __n));</a>
|
||
|
<a name="487"><span class="lineNum"> 487 </span> : : }</a>
|
||
|
<a name="488"><span class="lineNum"> 488 </span> : : </a>
|
||
|
<a name="489"><span class="lineNum"> 489 </span> : : /**</a>
|
||
|
<a name="490"><span class="lineNum"> 490 </span> : : * @brief Construct string as copy of a substring.</a>
|
||
|
<a name="491"><span class="lineNum"> 491 </span> : : * @param __str Source string.</a>
|
||
|
<a name="492"><span class="lineNum"> 492 </span> : : * @param __pos Index of first character to copy from.</a>
|
||
|
<a name="493"><span class="lineNum"> 493 </span> : : * @param __n Number of characters to copy.</a>
|
||
|
<a name="494"><span class="lineNum"> 494 </span> : : * @param __a Allocator to use.</a>
|
||
|
<a name="495"><span class="lineNum"> 495 </span> : : */</a>
|
||
|
<a name="496"><span class="lineNum"> 496 </span> : : basic_string(const basic_string& __str, size_type __pos,</a>
|
||
|
<a name="497"><span class="lineNum"> 497 </span> : : size_type __n, const _Alloc& __a)</a>
|
||
|
<a name="498"><span class="lineNum"> 498 </span> : : : _M_dataplus(_M_local_data(), __a)</a>
|
||
|
<a name="499"><span class="lineNum"> 499 </span> : : {</a>
|
||
|
<a name="500"><span class="lineNum"> 500 </span> : : const _CharT* __start</a>
|
||
|
<a name="501"><span class="lineNum"> 501 </span> : : = __str._M_data() + __str._M_check(__pos, "string::string");</a>
|
||
|
<a name="502"><span class="lineNum"> 502 </span> : : _M_construct(__start, __start + __str._M_limit(__pos, __n));</a>
|
||
|
<a name="503"><span class="lineNum"> 503 </span> : : }</a>
|
||
|
<a name="504"><span class="lineNum"> 504 </span> : : </a>
|
||
|
<a name="505"><span class="lineNum"> 505 </span> : : /**</a>
|
||
|
<a name="506"><span class="lineNum"> 506 </span> : : * @brief Construct string initialized by a character %array.</a>
|
||
|
<a name="507"><span class="lineNum"> 507 </span> : : * @param __s Source character %array.</a>
|
||
|
<a name="508"><span class="lineNum"> 508 </span> : : * @param __n Number of characters to copy.</a>
|
||
|
<a name="509"><span class="lineNum"> 509 </span> : : * @param __a Allocator to use (default is default allocator).</a>
|
||
|
<a name="510"><span class="lineNum"> 510 </span> : : *</a>
|
||
|
<a name="511"><span class="lineNum"> 511 </span> : : * NB: @a __s must have at least @a __n characters, &apos;\\0&apos;</a>
|
||
|
<a name="512"><span class="lineNum"> 512 </span> : : * has no special meaning.</a>
|
||
|
<a name="513"><span class="lineNum"> 513 </span> : : */</a>
|
||
|
<a name="514"><span class="lineNum"> 514 </span> : : basic_string(const _CharT* __s, size_type __n,</a>
|
||
|
<a name="515"><span class="lineNum"> 515 </span> : : const _Alloc& __a = _Alloc())</a>
|
||
|
<a name="516"><span class="lineNum"> 516 </span> : : : _M_dataplus(_M_local_data(), __a)</a>
|
||
|
<a name="517"><span class="lineNum"> 517 </span> : : { _M_construct(__s, __s + __n); }</a>
|
||
|
<a name="518"><span class="lineNum"> 518 </span> : : </a>
|
||
|
<a name="519"><span class="lineNum"> 519 </span> : : /**</a>
|
||
|
<a name="520"><span class="lineNum"> 520 </span> : : * @brief Construct string as copy of a C string.</a>
|
||
|
<a name="521"><span class="lineNum"> 521 </span> : : * @param __s Source C string.</a>
|
||
|
<a name="522"><span class="lineNum"> 522 </span> : : * @param __a Allocator to use (default is default allocator).</a>
|
||
|
<a name="523"><span class="lineNum"> 523 </span> : : */</a>
|
||
|
<a name="524"><span class="lineNum"> 524 </span> : : #if __cpp_deduction_guides && ! defined _GLIBCXX_DEFINING_STRING_INSTANTIATIONS</a>
|
||
|
<a name="525"><span class="lineNum"> 525 </span> : : // _GLIBCXX_RESOLVE_LIB_DEFECTS</a>
|
||
|
<a name="526"><span class="lineNum"> 526 </span> : : // 3076. basic_string CTAD ambiguity</a>
|
||
|
<a name="527"><span class="lineNum"> 527 </span> : : template<typename = _RequireAllocator<_Alloc>></a>
|
||
|
<a name="528"><span class="lineNum"> 528 </span> : : #endif</a>
|
||
|
<a name="529"><span class="lineNum"> 529 </span> : : basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())</a>
|
||
|
<a name="530"><span class="lineNum"> 530 </span> : : : _M_dataplus(_M_local_data(), __a)</a>
|
||
|
<a name="531"><span class="lineNum"> 531 </span> : : { _M_construct(__s, __s ? __s + traits_type::length(__s) : __s+npos); }</a>
|
||
|
<a name="532"><span class="lineNum"> 532 </span> : : </a>
|
||
|
<a name="533"><span class="lineNum"> 533 </span> : : /**</a>
|
||
|
<a name="534"><span class="lineNum"> 534 </span> : : * @brief Construct string as multiple characters.</a>
|
||
|
<a name="535"><span class="lineNum"> 535 </span> : : * @param __n Number of characters.</a>
|
||
|
<a name="536"><span class="lineNum"> 536 </span> : : * @param __c Character to use.</a>
|
||
|
<a name="537"><span class="lineNum"> 537 </span> : : * @param __a Allocator to use (default is default allocator).</a>
|
||
|
<a name="538"><span class="lineNum"> 538 </span> : : */</a>
|
||
|
<a name="539"><span class="lineNum"> 539 </span> : : #if __cpp_deduction_guides && ! defined _GLIBCXX_DEFINING_STRING_INSTANTIATIONS</a>
|
||
|
<a name="540"><span class="lineNum"> 540 </span> : : // _GLIBCXX_RESOLVE_LIB_DEFECTS</a>
|
||
|
<a name="541"><span class="lineNum"> 541 </span> : : // 3076. basic_string CTAD ambiguity</a>
|
||
|
<a name="542"><span class="lineNum"> 542 </span> : : template<typename = _RequireAllocator<_Alloc>></a>
|
||
|
<a name="543"><span class="lineNum"> 543 </span> : : #endif</a>
|
||
|
<a name="544"><span class="lineNum"> 544 </span> : : basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc())</a>
|
||
|
<a name="545"><span class="lineNum"> 545 </span> : : : _M_dataplus(_M_local_data(), __a)</a>
|
||
|
<a name="546"><span class="lineNum"> 546 </span> : : { _M_construct(__n, __c); }</a>
|
||
|
<a name="547"><span class="lineNum"> 547 </span> : : </a>
|
||
|
<a name="548"><span class="lineNum"> 548 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="549"><span class="lineNum"> 549 </span> : : /**</a>
|
||
|
<a name="550"><span class="lineNum"> 550 </span> : : * @brief Move construct string.</a>
|
||
|
<a name="551"><span class="lineNum"> 551 </span> : : * @param __str Source string.</a>
|
||
|
<a name="552"><span class="lineNum"> 552 </span> : : *</a>
|
||
|
<a name="553"><span class="lineNum"> 553 </span> : : * The newly-created string contains the exact contents of @a __str.</a>
|
||
|
<a name="554"><span class="lineNum"> 554 </span> : : * @a __str is a valid, but unspecified string.</a>
|
||
|
<a name="555"><span class="lineNum"> 555 </span> : : **/</a>
|
||
|
<a name="556"><span class="lineNum"> 556 </span> : : basic_string(basic_string&& __str) noexcept</a>
|
||
|
<a name="557"><span class="lineNum"> 557 </span> : : : _M_dataplus(_M_local_data(), std::move(__str._M_get_allocator()))</a>
|
||
|
<a name="558"><span class="lineNum"> 558 </span> : : {</a>
|
||
|
<a name="559"><span class="lineNum"> 559 </span> : : if (__str._M_is_local())</a>
|
||
|
<a name="560"><span class="lineNum"> 560 </span> : : {</a>
|
||
|
<a name="561"><span class="lineNum"> 561 </span> : : traits_type::copy(_M_local_buf, __str._M_local_buf,</a>
|
||
|
<a name="562"><span class="lineNum"> 562 </span> : : _S_local_capacity + 1);</a>
|
||
|
<a name="563"><span class="lineNum"> 563 </span> : : }</a>
|
||
|
<a name="564"><span class="lineNum"> 564 </span> : : else</a>
|
||
|
<a name="565"><span class="lineNum"> 565 </span> : : {</a>
|
||
|
<a name="566"><span class="lineNum"> 566 </span> : : _M_data(__str._M_data());</a>
|
||
|
<a name="567"><span class="lineNum"> 567 </span> : : _M_capacity(__str._M_allocated_capacity);</a>
|
||
|
<a name="568"><span class="lineNum"> 568 </span> : : }</a>
|
||
|
<a name="569"><span class="lineNum"> 569 </span> : : </a>
|
||
|
<a name="570"><span class="lineNum"> 570 </span> : : // Must use _M_length() here not _M_set_length() because</a>
|
||
|
<a name="571"><span class="lineNum"> 571 </span> : : // basic_stringbuf relies on writing into unallocated capacity so</a>
|
||
|
<a name="572"><span class="lineNum"> 572 </span> : : // we mess up the contents if we put a '\0' in the string.</a>
|
||
|
<a name="573"><span class="lineNum"> 573 </span> : : _M_length(__str.length());</a>
|
||
|
<a name="574"><span class="lineNum"> 574 </span> : : __str._M_data(__str._M_local_data());</a>
|
||
|
<a name="575"><span class="lineNum"> 575 </span> : : __str._M_set_length(0);</a>
|
||
|
<a name="576"><span class="lineNum"> 576 </span> : : }</a>
|
||
|
<a name="577"><span class="lineNum"> 577 </span> : : </a>
|
||
|
<a name="578"><span class="lineNum"> 578 </span> : : /**</a>
|
||
|
<a name="579"><span class="lineNum"> 579 </span> : : * @brief Construct string from an initializer %list.</a>
|
||
|
<a name="580"><span class="lineNum"> 580 </span> : : * @param __l std::initializer_list of characters.</a>
|
||
|
<a name="581"><span class="lineNum"> 581 </span> : : * @param __a Allocator to use (default is default allocator).</a>
|
||
|
<a name="582"><span class="lineNum"> 582 </span> : : */</a>
|
||
|
<a name="583"><span class="lineNum"> 583 </span> : : basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())</a>
|
||
|
<a name="584"><span class="lineNum"> 584 </span> : : : _M_dataplus(_M_local_data(), __a)</a>
|
||
|
<a name="585"><span class="lineNum"> 585 </span> : : { _M_construct(__l.begin(), __l.end()); }</a>
|
||
|
<a name="586"><span class="lineNum"> 586 </span> : : </a>
|
||
|
<a name="587"><span class="lineNum"> 587 </span> : : basic_string(const basic_string& __str, const _Alloc& __a)</a>
|
||
|
<a name="588"><span class="lineNum"> 588 </span> : : : _M_dataplus(_M_local_data(), __a)</a>
|
||
|
<a name="589"><span class="lineNum"> 589 </span> : : { _M_construct(__str.begin(), __str.end()); }</a>
|
||
|
<a name="590"><span class="lineNum"> 590 </span> : : </a>
|
||
|
<a name="591"><span class="lineNum"> 591 </span> : : basic_string(basic_string&& __str, const _Alloc& __a)</a>
|
||
|
<a name="592"><span class="lineNum"> 592 </span> : : noexcept(_Alloc_traits::_S_always_equal())</a>
|
||
|
<a name="593"><span class="lineNum"> 593 </span> : : : _M_dataplus(_M_local_data(), __a)</a>
|
||
|
<a name="594"><span class="lineNum"> 594 </span> : : {</a>
|
||
|
<a name="595"><span class="lineNum"> 595 </span> : : if (__str._M_is_local())</a>
|
||
|
<a name="596"><span class="lineNum"> 596 </span> : : {</a>
|
||
|
<a name="597"><span class="lineNum"> 597 </span> : : traits_type::copy(_M_local_buf, __str._M_local_buf,</a>
|
||
|
<a name="598"><span class="lineNum"> 598 </span> : : _S_local_capacity + 1);</a>
|
||
|
<a name="599"><span class="lineNum"> 599 </span> : : _M_length(__str.length());</a>
|
||
|
<a name="600"><span class="lineNum"> 600 </span> : : __str._M_set_length(0);</a>
|
||
|
<a name="601"><span class="lineNum"> 601 </span> : : }</a>
|
||
|
<a name="602"><span class="lineNum"> 602 </span> : : else if (_Alloc_traits::_S_always_equal()</a>
|
||
|
<a name="603"><span class="lineNum"> 603 </span> : : || __str.get_allocator() == __a)</a>
|
||
|
<a name="604"><span class="lineNum"> 604 </span> : : {</a>
|
||
|
<a name="605"><span class="lineNum"> 605 </span> : : _M_data(__str._M_data());</a>
|
||
|
<a name="606"><span class="lineNum"> 606 </span> : : _M_length(__str.length());</a>
|
||
|
<a name="607"><span class="lineNum"> 607 </span> : : _M_capacity(__str._M_allocated_capacity);</a>
|
||
|
<a name="608"><span class="lineNum"> 608 </span> : : __str._M_data(__str._M_local_buf);</a>
|
||
|
<a name="609"><span class="lineNum"> 609 </span> : : __str._M_set_length(0);</a>
|
||
|
<a name="610"><span class="lineNum"> 610 </span> : : }</a>
|
||
|
<a name="611"><span class="lineNum"> 611 </span> : : else</a>
|
||
|
<a name="612"><span class="lineNum"> 612 </span> : : _M_construct(__str.begin(), __str.end());</a>
|
||
|
<a name="613"><span class="lineNum"> 613 </span> : : }</a>
|
||
|
<a name="614"><span class="lineNum"> 614 </span> : : </a>
|
||
|
<a name="615"><span class="lineNum"> 615 </span> : : #endif // C++11</a>
|
||
|
<a name="616"><span class="lineNum"> 616 </span> : : </a>
|
||
|
<a name="617"><span class="lineNum"> 617 </span> : : /**</a>
|
||
|
<a name="618"><span class="lineNum"> 618 </span> : : * @brief Construct string as copy of a range.</a>
|
||
|
<a name="619"><span class="lineNum"> 619 </span> : : * @param __beg Start of range.</a>
|
||
|
<a name="620"><span class="lineNum"> 620 </span> : : * @param __end End of range.</a>
|
||
|
<a name="621"><span class="lineNum"> 621 </span> : : * @param __a Allocator to use (default is default allocator).</a>
|
||
|
<a name="622"><span class="lineNum"> 622 </span> : : */</a>
|
||
|
<a name="623"><span class="lineNum"> 623 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="624"><span class="lineNum"> 624 </span> : : template<typename _InputIterator,</a>
|
||
|
<a name="625"><span class="lineNum"> 625 </span> : : typename = std::_RequireInputIter<_InputIterator>></a>
|
||
|
<a name="626"><span class="lineNum"> 626 </span> : : #else</a>
|
||
|
<a name="627"><span class="lineNum"> 627 </span> : : template<typename _InputIterator></a>
|
||
|
<a name="628"><span class="lineNum"> 628 </span> : : #endif</a>
|
||
|
<a name="629"><span class="lineNum"> 629 </span> :<span class="lineCov"> 25 : basic_string(_InputIterator __beg, _InputIterator __end,</span></a>
|
||
|
<a name="630"><span class="lineNum"> 630 </span> : : const _Alloc& __a = _Alloc())</a>
|
||
|
<a name="631"><span class="lineNum"> 631 </span> :<span class="lineCov"> 25 : : _M_dataplus(_M_local_data(), __a)</span></a>
|
||
|
<a name="632"><span class="lineNum"> 632 </span> [<span class="branchCov" title="Branch 0 was taken 25 times"> + </span><span class="branchNoCov" title="Branch 1 was not taken"> - </span>]:<span class="lineCov"> 25 : { _M_construct(__beg, __end); }</span></a>
|
||
|
<a name="633"><span class="lineNum"> 633 </span> : : </a>
|
||
|
<a name="634"><span class="lineNum"> 634 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="635"><span class="lineNum"> 635 </span> : : /**</a>
|
||
|
<a name="636"><span class="lineNum"> 636 </span> : : * @brief Construct string from a substring of a string_view.</a>
|
||
|
<a name="637"><span class="lineNum"> 637 </span> : : * @param __t Source object convertible to string view.</a>
|
||
|
<a name="638"><span class="lineNum"> 638 </span> : : * @param __pos The index of the first character to copy from __t.</a>
|
||
|
<a name="639"><span class="lineNum"> 639 </span> : : * @param __n The number of characters to copy from __t.</a>
|
||
|
<a name="640"><span class="lineNum"> 640 </span> : : * @param __a Allocator to use.</a>
|
||
|
<a name="641"><span class="lineNum"> 641 </span> : : */</a>
|
||
|
<a name="642"><span class="lineNum"> 642 </span> : : template<typename _Tp, typename = _If_sv<_Tp, void>></a>
|
||
|
<a name="643"><span class="lineNum"> 643 </span> : : basic_string(const _Tp& __t, size_type __pos, size_type __n,</a>
|
||
|
<a name="644"><span class="lineNum"> 644 </span> : : const _Alloc& __a = _Alloc())</a>
|
||
|
<a name="645"><span class="lineNum"> 645 </span> : : : basic_string(_S_to_string_view(__t).substr(__pos, __n), __a) { }</a>
|
||
|
<a name="646"><span class="lineNum"> 646 </span> : : </a>
|
||
|
<a name="647"><span class="lineNum"> 647 </span> : : /**</a>
|
||
|
<a name="648"><span class="lineNum"> 648 </span> : : * @brief Construct string from a string_view.</a>
|
||
|
<a name="649"><span class="lineNum"> 649 </span> : : * @param __t Source object convertible to string view.</a>
|
||
|
<a name="650"><span class="lineNum"> 650 </span> : : * @param __a Allocator to use (default is default allocator).</a>
|
||
|
<a name="651"><span class="lineNum"> 651 </span> : : */</a>
|
||
|
<a name="652"><span class="lineNum"> 652 </span> : : template<typename _Tp, typename = _If_sv<_Tp, void>></a>
|
||
|
<a name="653"><span class="lineNum"> 653 </span> : : explicit</a>
|
||
|
<a name="654"><span class="lineNum"> 654 </span> : : basic_string(const _Tp& __t, const _Alloc& __a = _Alloc())</a>
|
||
|
<a name="655"><span class="lineNum"> 655 </span> : : : basic_string(__sv_wrapper(_S_to_string_view(__t)), __a) { }</a>
|
||
|
<a name="656"><span class="lineNum"> 656 </span> : : #endif // C++17</a>
|
||
|
<a name="657"><span class="lineNum"> 657 </span> : : </a>
|
||
|
<a name="658"><span class="lineNum"> 658 </span> : : /**</a>
|
||
|
<a name="659"><span class="lineNum"> 659 </span> : : * @brief Destroy the string instance.</a>
|
||
|
<a name="660"><span class="lineNum"> 660 </span> : : */</a>
|
||
|
<a name="661"><span class="lineNum"> 661 </span> : : ~basic_string()</a>
|
||
|
<a name="662"><span class="lineNum"> 662 </span> : : { _M_dispose(); }</a>
|
||
|
<a name="663"><span class="lineNum"> 663 </span> : : </a>
|
||
|
<a name="664"><span class="lineNum"> 664 </span> : : /**</a>
|
||
|
<a name="665"><span class="lineNum"> 665 </span> : : * @brief Assign the value of @a str to this string.</a>
|
||
|
<a name="666"><span class="lineNum"> 666 </span> : : * @param __str Source string.</a>
|
||
|
<a name="667"><span class="lineNum"> 667 </span> : : */</a>
|
||
|
<a name="668"><span class="lineNum"> 668 </span> : : basic_string&</a>
|
||
|
<a name="669"><span class="lineNum"> 669 </span> : : operator=(const basic_string& __str)</a>
|
||
|
<a name="670"><span class="lineNum"> 670 </span> : : {</a>
|
||
|
<a name="671"><span class="lineNum"> 671 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="672"><span class="lineNum"> 672 </span> : : if (_Alloc_traits::_S_propagate_on_copy_assign())</a>
|
||
|
<a name="673"><span class="lineNum"> 673 </span> : : {</a>
|
||
|
<a name="674"><span class="lineNum"> 674 </span> : : if (!_Alloc_traits::_S_always_equal() && !_M_is_local()</a>
|
||
|
<a name="675"><span class="lineNum"> 675 </span> : : && _M_get_allocator() != __str._M_get_allocator())</a>
|
||
|
<a name="676"><span class="lineNum"> 676 </span> : : {</a>
|
||
|
<a name="677"><span class="lineNum"> 677 </span> : : // Propagating allocator cannot free existing storage so must</a>
|
||
|
<a name="678"><span class="lineNum"> 678 </span> : : // deallocate it before replacing current allocator.</a>
|
||
|
<a name="679"><span class="lineNum"> 679 </span> : : if (__str.size() <= _S_local_capacity)</a>
|
||
|
<a name="680"><span class="lineNum"> 680 </span> : : {</a>
|
||
|
<a name="681"><span class="lineNum"> 681 </span> : : _M_destroy(_M_allocated_capacity);</a>
|
||
|
<a name="682"><span class="lineNum"> 682 </span> : : _M_data(_M_local_data());</a>
|
||
|
<a name="683"><span class="lineNum"> 683 </span> : : _M_set_length(0);</a>
|
||
|
<a name="684"><span class="lineNum"> 684 </span> : : }</a>
|
||
|
<a name="685"><span class="lineNum"> 685 </span> : : else</a>
|
||
|
<a name="686"><span class="lineNum"> 686 </span> : : {</a>
|
||
|
<a name="687"><span class="lineNum"> 687 </span> : : const auto __len = __str.size();</a>
|
||
|
<a name="688"><span class="lineNum"> 688 </span> : : auto __alloc = __str._M_get_allocator();</a>
|
||
|
<a name="689"><span class="lineNum"> 689 </span> : : // If this allocation throws there are no effects:</a>
|
||
|
<a name="690"><span class="lineNum"> 690 </span> : : auto __ptr = _Alloc_traits::allocate(__alloc, __len + 1);</a>
|
||
|
<a name="691"><span class="lineNum"> 691 </span> : : _M_destroy(_M_allocated_capacity);</a>
|
||
|
<a name="692"><span class="lineNum"> 692 </span> : : _M_data(__ptr);</a>
|
||
|
<a name="693"><span class="lineNum"> 693 </span> : : _M_capacity(__len);</a>
|
||
|
<a name="694"><span class="lineNum"> 694 </span> : : _M_set_length(__len);</a>
|
||
|
<a name="695"><span class="lineNum"> 695 </span> : : }</a>
|
||
|
<a name="696"><span class="lineNum"> 696 </span> : : }</a>
|
||
|
<a name="697"><span class="lineNum"> 697 </span> : : std::__alloc_on_copy(_M_get_allocator(), __str._M_get_allocator());</a>
|
||
|
<a name="698"><span class="lineNum"> 698 </span> : : }</a>
|
||
|
<a name="699"><span class="lineNum"> 699 </span> : : #endif</a>
|
||
|
<a name="700"><span class="lineNum"> 700 </span> : : return this->assign(__str);</a>
|
||
|
<a name="701"><span class="lineNum"> 701 </span> : : }</a>
|
||
|
<a name="702"><span class="lineNum"> 702 </span> : : </a>
|
||
|
<a name="703"><span class="lineNum"> 703 </span> : : /**</a>
|
||
|
<a name="704"><span class="lineNum"> 704 </span> : : * @brief Copy contents of @a s into this string.</a>
|
||
|
<a name="705"><span class="lineNum"> 705 </span> : : * @param __s Source null-terminated string.</a>
|
||
|
<a name="706"><span class="lineNum"> 706 </span> : : */</a>
|
||
|
<a name="707"><span class="lineNum"> 707 </span> : : basic_string&</a>
|
||
|
<a name="708"><span class="lineNum"> 708 </span> : : operator=(const _CharT* __s)</a>
|
||
|
<a name="709"><span class="lineNum"> 709 </span> : : { return this->assign(__s); }</a>
|
||
|
<a name="710"><span class="lineNum"> 710 </span> : : </a>
|
||
|
<a name="711"><span class="lineNum"> 711 </span> : : /**</a>
|
||
|
<a name="712"><span class="lineNum"> 712 </span> : : * @brief Set value to string of length 1.</a>
|
||
|
<a name="713"><span class="lineNum"> 713 </span> : : * @param __c Source character.</a>
|
||
|
<a name="714"><span class="lineNum"> 714 </span> : : *</a>
|
||
|
<a name="715"><span class="lineNum"> 715 </span> : : * Assigning to a character makes this string length 1 and</a>
|
||
|
<a name="716"><span class="lineNum"> 716 </span> : : * (*this)[0] == @a c.</a>
|
||
|
<a name="717"><span class="lineNum"> 717 </span> : : */</a>
|
||
|
<a name="718"><span class="lineNum"> 718 </span> : : basic_string&</a>
|
||
|
<a name="719"><span class="lineNum"> 719 </span> : : operator=(_CharT __c)</a>
|
||
|
<a name="720"><span class="lineNum"> 720 </span> : : {</a>
|
||
|
<a name="721"><span class="lineNum"> 721 </span> : : this->assign(1, __c);</a>
|
||
|
<a name="722"><span class="lineNum"> 722 </span> : : return *this;</a>
|
||
|
<a name="723"><span class="lineNum"> 723 </span> : : }</a>
|
||
|
<a name="724"><span class="lineNum"> 724 </span> : : </a>
|
||
|
<a name="725"><span class="lineNum"> 725 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="726"><span class="lineNum"> 726 </span> : : /**</a>
|
||
|
<a name="727"><span class="lineNum"> 727 </span> : : * @brief Move assign the value of @a str to this string.</a>
|
||
|
<a name="728"><span class="lineNum"> 728 </span> : : * @param __str Source string.</a>
|
||
|
<a name="729"><span class="lineNum"> 729 </span> : : *</a>
|
||
|
<a name="730"><span class="lineNum"> 730 </span> : : * The contents of @a str are moved into this string (without copying).</a>
|
||
|
<a name="731"><span class="lineNum"> 731 </span> : : * @a str is a valid, but unspecified string.</a>
|
||
|
<a name="732"><span class="lineNum"> 732 </span> : : **/</a>
|
||
|
<a name="733"><span class="lineNum"> 733 </span> : : // _GLIBCXX_RESOLVE_LIB_DEFECTS</a>
|
||
|
<a name="734"><span class="lineNum"> 734 </span> : : // 2063. Contradictory requirements for string move assignment</a>
|
||
|
<a name="735"><span class="lineNum"> 735 </span> : : basic_string&</a>
|
||
|
<a name="736"><span class="lineNum"> 736 </span> : : operator=(basic_string&& __str)</a>
|
||
|
<a name="737"><span class="lineNum"> 737 </span> : : noexcept(_Alloc_traits::_S_nothrow_move())</a>
|
||
|
<a name="738"><span class="lineNum"> 738 </span> : : {</a>
|
||
|
<a name="739"><span class="lineNum"> 739 </span> : : if (!_M_is_local() && _Alloc_traits::_S_propagate_on_move_assign()</a>
|
||
|
<a name="740"><span class="lineNum"> 740 </span> : : && !_Alloc_traits::_S_always_equal()</a>
|
||
|
<a name="741"><span class="lineNum"> 741 </span> : : && _M_get_allocator() != __str._M_get_allocator())</a>
|
||
|
<a name="742"><span class="lineNum"> 742 </span> : : {</a>
|
||
|
<a name="743"><span class="lineNum"> 743 </span> : : // Destroy existing storage before replacing allocator.</a>
|
||
|
<a name="744"><span class="lineNum"> 744 </span> : : _M_destroy(_M_allocated_capacity);</a>
|
||
|
<a name="745"><span class="lineNum"> 745 </span> : : _M_data(_M_local_data());</a>
|
||
|
<a name="746"><span class="lineNum"> 746 </span> : : _M_set_length(0);</a>
|
||
|
<a name="747"><span class="lineNum"> 747 </span> : : }</a>
|
||
|
<a name="748"><span class="lineNum"> 748 </span> : : // Replace allocator if POCMA is true.</a>
|
||
|
<a name="749"><span class="lineNum"> 749 </span> : : std::__alloc_on_move(_M_get_allocator(), __str._M_get_allocator());</a>
|
||
|
<a name="750"><span class="lineNum"> 750 </span> : : </a>
|
||
|
<a name="751"><span class="lineNum"> 751 </span> : : if (__str._M_is_local())</a>
|
||
|
<a name="752"><span class="lineNum"> 752 </span> : : {</a>
|
||
|
<a name="753"><span class="lineNum"> 753 </span> : : // We've always got room for a short string, just copy it.</a>
|
||
|
<a name="754"><span class="lineNum"> 754 </span> : : if (__str.size())</a>
|
||
|
<a name="755"><span class="lineNum"> 755 </span> : : this->_S_copy(_M_data(), __str._M_data(), __str.size());</a>
|
||
|
<a name="756"><span class="lineNum"> 756 </span> : : _M_set_length(__str.size());</a>
|
||
|
<a name="757"><span class="lineNum"> 757 </span> : : }</a>
|
||
|
<a name="758"><span class="lineNum"> 758 </span> : : else if (_Alloc_traits::_S_propagate_on_move_assign()</a>
|
||
|
<a name="759"><span class="lineNum"> 759 </span> : : || _Alloc_traits::_S_always_equal()</a>
|
||
|
<a name="760"><span class="lineNum"> 760 </span> : : || _M_get_allocator() == __str._M_get_allocator())</a>
|
||
|
<a name="761"><span class="lineNum"> 761 </span> : : {</a>
|
||
|
<a name="762"><span class="lineNum"> 762 </span> : : // Just move the allocated pointer, our allocator can free it.</a>
|
||
|
<a name="763"><span class="lineNum"> 763 </span> : : pointer __data = nullptr;</a>
|
||
|
<a name="764"><span class="lineNum"> 764 </span> : : size_type __capacity;</a>
|
||
|
<a name="765"><span class="lineNum"> 765 </span> : : if (!_M_is_local())</a>
|
||
|
<a name="766"><span class="lineNum"> 766 </span> : : {</a>
|
||
|
<a name="767"><span class="lineNum"> 767 </span> : : if (_Alloc_traits::_S_always_equal())</a>
|
||
|
<a name="768"><span class="lineNum"> 768 </span> : : {</a>
|
||
|
<a name="769"><span class="lineNum"> 769 </span> : : // __str can reuse our existing storage.</a>
|
||
|
<a name="770"><span class="lineNum"> 770 </span> : : __data = _M_data();</a>
|
||
|
<a name="771"><span class="lineNum"> 771 </span> : : __capacity = _M_allocated_capacity;</a>
|
||
|
<a name="772"><span class="lineNum"> 772 </span> : : }</a>
|
||
|
<a name="773"><span class="lineNum"> 773 </span> : : else // __str can't use it, so free it.</a>
|
||
|
<a name="774"><span class="lineNum"> 774 </span> : : _M_destroy(_M_allocated_capacity);</a>
|
||
|
<a name="775"><span class="lineNum"> 775 </span> : : }</a>
|
||
|
<a name="776"><span class="lineNum"> 776 </span> : : </a>
|
||
|
<a name="777"><span class="lineNum"> 777 </span> : : _M_data(__str._M_data());</a>
|
||
|
<a name="778"><span class="lineNum"> 778 </span> : : _M_length(__str.length());</a>
|
||
|
<a name="779"><span class="lineNum"> 779 </span> : : _M_capacity(__str._M_allocated_capacity);</a>
|
||
|
<a name="780"><span class="lineNum"> 780 </span> : : if (__data)</a>
|
||
|
<a name="781"><span class="lineNum"> 781 </span> : : {</a>
|
||
|
<a name="782"><span class="lineNum"> 782 </span> : : __str._M_data(__data);</a>
|
||
|
<a name="783"><span class="lineNum"> 783 </span> : : __str._M_capacity(__capacity);</a>
|
||
|
<a name="784"><span class="lineNum"> 784 </span> : : }</a>
|
||
|
<a name="785"><span class="lineNum"> 785 </span> : : else</a>
|
||
|
<a name="786"><span class="lineNum"> 786 </span> : : __str._M_data(__str._M_local_buf);</a>
|
||
|
<a name="787"><span class="lineNum"> 787 </span> : : }</a>
|
||
|
<a name="788"><span class="lineNum"> 788 </span> : : else // Need to do a deep copy</a>
|
||
|
<a name="789"><span class="lineNum"> 789 </span> : : assign(__str);</a>
|
||
|
<a name="790"><span class="lineNum"> 790 </span> : : __str.clear();</a>
|
||
|
<a name="791"><span class="lineNum"> 791 </span> : : return *this;</a>
|
||
|
<a name="792"><span class="lineNum"> 792 </span> : : }</a>
|
||
|
<a name="793"><span class="lineNum"> 793 </span> : : </a>
|
||
|
<a name="794"><span class="lineNum"> 794 </span> : : /**</a>
|
||
|
<a name="795"><span class="lineNum"> 795 </span> : : * @brief Set value to string constructed from initializer %list.</a>
|
||
|
<a name="796"><span class="lineNum"> 796 </span> : : * @param __l std::initializer_list.</a>
|
||
|
<a name="797"><span class="lineNum"> 797 </span> : : */</a>
|
||
|
<a name="798"><span class="lineNum"> 798 </span> : : basic_string&</a>
|
||
|
<a name="799"><span class="lineNum"> 799 </span> : : operator=(initializer_list<_CharT> __l)</a>
|
||
|
<a name="800"><span class="lineNum"> 800 </span> : : {</a>
|
||
|
<a name="801"><span class="lineNum"> 801 </span> : : this->assign(__l.begin(), __l.size());</a>
|
||
|
<a name="802"><span class="lineNum"> 802 </span> : : return *this;</a>
|
||
|
<a name="803"><span class="lineNum"> 803 </span> : : }</a>
|
||
|
<a name="804"><span class="lineNum"> 804 </span> : : #endif // C++11</a>
|
||
|
<a name="805"><span class="lineNum"> 805 </span> : : </a>
|
||
|
<a name="806"><span class="lineNum"> 806 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="807"><span class="lineNum"> 807 </span> : : /**</a>
|
||
|
<a name="808"><span class="lineNum"> 808 </span> : : * @brief Set value to string constructed from a string_view.</a>
|
||
|
<a name="809"><span class="lineNum"> 809 </span> : : * @param __svt An object convertible to string_view.</a>
|
||
|
<a name="810"><span class="lineNum"> 810 </span> : : */</a>
|
||
|
<a name="811"><span class="lineNum"> 811 </span> : : template<typename _Tp></a>
|
||
|
<a name="812"><span class="lineNum"> 812 </span> : : _If_sv<_Tp, basic_string&></a>
|
||
|
<a name="813"><span class="lineNum"> 813 </span> : : operator=(const _Tp& __svt)</a>
|
||
|
<a name="814"><span class="lineNum"> 814 </span> : : { return this->assign(__svt); }</a>
|
||
|
<a name="815"><span class="lineNum"> 815 </span> : : </a>
|
||
|
<a name="816"><span class="lineNum"> 816 </span> : : /**</a>
|
||
|
<a name="817"><span class="lineNum"> 817 </span> : : * @brief Convert to a string_view.</a>
|
||
|
<a name="818"><span class="lineNum"> 818 </span> : : * @return A string_view.</a>
|
||
|
<a name="819"><span class="lineNum"> 819 </span> : : */</a>
|
||
|
<a name="820"><span class="lineNum"> 820 </span> : : operator __sv_type() const noexcept</a>
|
||
|
<a name="821"><span class="lineNum"> 821 </span> : : { return __sv_type(data(), size()); }</a>
|
||
|
<a name="822"><span class="lineNum"> 822 </span> : : #endif // C++17</a>
|
||
|
<a name="823"><span class="lineNum"> 823 </span> : : </a>
|
||
|
<a name="824"><span class="lineNum"> 824 </span> : : // Iterators:</a>
|
||
|
<a name="825"><span class="lineNum"> 825 </span> : : /**</a>
|
||
|
<a name="826"><span class="lineNum"> 826 </span> : : * Returns a read/write iterator that points to the first character in</a>
|
||
|
<a name="827"><span class="lineNum"> 827 </span> : : * the %string.</a>
|
||
|
<a name="828"><span class="lineNum"> 828 </span> : : */</a>
|
||
|
<a name="829"><span class="lineNum"> 829 </span> : : iterator</a>
|
||
|
<a name="830"><span class="lineNum"> 830 </span> : : begin() _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="831"><span class="lineNum"> 831 </span> : : { return iterator(_M_data()); }</a>
|
||
|
<a name="832"><span class="lineNum"> 832 </span> : : </a>
|
||
|
<a name="833"><span class="lineNum"> 833 </span> : : /**</a>
|
||
|
<a name="834"><span class="lineNum"> 834 </span> : : * Returns a read-only (constant) iterator that points to the first</a>
|
||
|
<a name="835"><span class="lineNum"> 835 </span> : : * character in the %string.</a>
|
||
|
<a name="836"><span class="lineNum"> 836 </span> : : */</a>
|
||
|
<a name="837"><span class="lineNum"> 837 </span> : : const_iterator</a>
|
||
|
<a name="838"><span class="lineNum"> 838 </span> : : begin() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="839"><span class="lineNum"> 839 </span> : : { return const_iterator(_M_data()); }</a>
|
||
|
<a name="840"><span class="lineNum"> 840 </span> : : </a>
|
||
|
<a name="841"><span class="lineNum"> 841 </span> : : /**</a>
|
||
|
<a name="842"><span class="lineNum"> 842 </span> : : * Returns a read/write iterator that points one past the last</a>
|
||
|
<a name="843"><span class="lineNum"> 843 </span> : : * character in the %string.</a>
|
||
|
<a name="844"><span class="lineNum"> 844 </span> : : */</a>
|
||
|
<a name="845"><span class="lineNum"> 845 </span> : : iterator</a>
|
||
|
<a name="846"><span class="lineNum"> 846 </span> : : end() _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="847"><span class="lineNum"> 847 </span> : : { return iterator(_M_data() + this->size()); }</a>
|
||
|
<a name="848"><span class="lineNum"> 848 </span> : : </a>
|
||
|
<a name="849"><span class="lineNum"> 849 </span> : : /**</a>
|
||
|
<a name="850"><span class="lineNum"> 850 </span> : : * Returns a read-only (constant) iterator that points one past the</a>
|
||
|
<a name="851"><span class="lineNum"> 851 </span> : : * last character in the %string.</a>
|
||
|
<a name="852"><span class="lineNum"> 852 </span> : : */</a>
|
||
|
<a name="853"><span class="lineNum"> 853 </span> : : const_iterator</a>
|
||
|
<a name="854"><span class="lineNum"> 854 </span> : : end() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="855"><span class="lineNum"> 855 </span> : : { return const_iterator(_M_data() + this->size()); }</a>
|
||
|
<a name="856"><span class="lineNum"> 856 </span> : : </a>
|
||
|
<a name="857"><span class="lineNum"> 857 </span> : : /**</a>
|
||
|
<a name="858"><span class="lineNum"> 858 </span> : : * Returns a read/write reverse iterator that points to the last</a>
|
||
|
<a name="859"><span class="lineNum"> 859 </span> : : * character in the %string. Iteration is done in reverse element</a>
|
||
|
<a name="860"><span class="lineNum"> 860 </span> : : * order.</a>
|
||
|
<a name="861"><span class="lineNum"> 861 </span> : : */</a>
|
||
|
<a name="862"><span class="lineNum"> 862 </span> : : reverse_iterator</a>
|
||
|
<a name="863"><span class="lineNum"> 863 </span> : : rbegin() _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="864"><span class="lineNum"> 864 </span> : : { return reverse_iterator(this->end()); }</a>
|
||
|
<a name="865"><span class="lineNum"> 865 </span> : : </a>
|
||
|
<a name="866"><span class="lineNum"> 866 </span> : : /**</a>
|
||
|
<a name="867"><span class="lineNum"> 867 </span> : : * Returns a read-only (constant) reverse iterator that points</a>
|
||
|
<a name="868"><span class="lineNum"> 868 </span> : : * to the last character in the %string. Iteration is done in</a>
|
||
|
<a name="869"><span class="lineNum"> 869 </span> : : * reverse element order.</a>
|
||
|
<a name="870"><span class="lineNum"> 870 </span> : : */</a>
|
||
|
<a name="871"><span class="lineNum"> 871 </span> : : const_reverse_iterator</a>
|
||
|
<a name="872"><span class="lineNum"> 872 </span> : : rbegin() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="873"><span class="lineNum"> 873 </span> : : { return const_reverse_iterator(this->end()); }</a>
|
||
|
<a name="874"><span class="lineNum"> 874 </span> : : </a>
|
||
|
<a name="875"><span class="lineNum"> 875 </span> : : /**</a>
|
||
|
<a name="876"><span class="lineNum"> 876 </span> : : * Returns a read/write reverse iterator that points to one before the</a>
|
||
|
<a name="877"><span class="lineNum"> 877 </span> : : * first character in the %string. Iteration is done in reverse</a>
|
||
|
<a name="878"><span class="lineNum"> 878 </span> : : * element order.</a>
|
||
|
<a name="879"><span class="lineNum"> 879 </span> : : */</a>
|
||
|
<a name="880"><span class="lineNum"> 880 </span> : : reverse_iterator</a>
|
||
|
<a name="881"><span class="lineNum"> 881 </span> : : rend() _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="882"><span class="lineNum"> 882 </span> : : { return reverse_iterator(this->begin()); }</a>
|
||
|
<a name="883"><span class="lineNum"> 883 </span> : : </a>
|
||
|
<a name="884"><span class="lineNum"> 884 </span> : : /**</a>
|
||
|
<a name="885"><span class="lineNum"> 885 </span> : : * Returns a read-only (constant) reverse iterator that points</a>
|
||
|
<a name="886"><span class="lineNum"> 886 </span> : : * to one before the first character in the %string. Iteration</a>
|
||
|
<a name="887"><span class="lineNum"> 887 </span> : : * is done in reverse element order.</a>
|
||
|
<a name="888"><span class="lineNum"> 888 </span> : : */</a>
|
||
|
<a name="889"><span class="lineNum"> 889 </span> : : const_reverse_iterator</a>
|
||
|
<a name="890"><span class="lineNum"> 890 </span> : : rend() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="891"><span class="lineNum"> 891 </span> : : { return const_reverse_iterator(this->begin()); }</a>
|
||
|
<a name="892"><span class="lineNum"> 892 </span> : : </a>
|
||
|
<a name="893"><span class="lineNum"> 893 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="894"><span class="lineNum"> 894 </span> : : /**</a>
|
||
|
<a name="895"><span class="lineNum"> 895 </span> : : * Returns a read-only (constant) iterator that points to the first</a>
|
||
|
<a name="896"><span class="lineNum"> 896 </span> : : * character in the %string.</a>
|
||
|
<a name="897"><span class="lineNum"> 897 </span> : : */</a>
|
||
|
<a name="898"><span class="lineNum"> 898 </span> : : const_iterator</a>
|
||
|
<a name="899"><span class="lineNum"> 899 </span> : : cbegin() const noexcept</a>
|
||
|
<a name="900"><span class="lineNum"> 900 </span> : : { return const_iterator(this->_M_data()); }</a>
|
||
|
<a name="901"><span class="lineNum"> 901 </span> : : </a>
|
||
|
<a name="902"><span class="lineNum"> 902 </span> : : /**</a>
|
||
|
<a name="903"><span class="lineNum"> 903 </span> : : * Returns a read-only (constant) iterator that points one past the</a>
|
||
|
<a name="904"><span class="lineNum"> 904 </span> : : * last character in the %string.</a>
|
||
|
<a name="905"><span class="lineNum"> 905 </span> : : */</a>
|
||
|
<a name="906"><span class="lineNum"> 906 </span> : : const_iterator</a>
|
||
|
<a name="907"><span class="lineNum"> 907 </span> : : cend() const noexcept</a>
|
||
|
<a name="908"><span class="lineNum"> 908 </span> : : { return const_iterator(this->_M_data() + this->size()); }</a>
|
||
|
<a name="909"><span class="lineNum"> 909 </span> : : </a>
|
||
|
<a name="910"><span class="lineNum"> 910 </span> : : /**</a>
|
||
|
<a name="911"><span class="lineNum"> 911 </span> : : * Returns a read-only (constant) reverse iterator that points</a>
|
||
|
<a name="912"><span class="lineNum"> 912 </span> : : * to the last character in the %string. Iteration is done in</a>
|
||
|
<a name="913"><span class="lineNum"> 913 </span> : : * reverse element order.</a>
|
||
|
<a name="914"><span class="lineNum"> 914 </span> : : */</a>
|
||
|
<a name="915"><span class="lineNum"> 915 </span> : : const_reverse_iterator</a>
|
||
|
<a name="916"><span class="lineNum"> 916 </span> : : crbegin() const noexcept</a>
|
||
|
<a name="917"><span class="lineNum"> 917 </span> : : { return const_reverse_iterator(this->end()); }</a>
|
||
|
<a name="918"><span class="lineNum"> 918 </span> : : </a>
|
||
|
<a name="919"><span class="lineNum"> 919 </span> : : /**</a>
|
||
|
<a name="920"><span class="lineNum"> 920 </span> : : * Returns a read-only (constant) reverse iterator that points</a>
|
||
|
<a name="921"><span class="lineNum"> 921 </span> : : * to one before the first character in the %string. Iteration</a>
|
||
|
<a name="922"><span class="lineNum"> 922 </span> : : * is done in reverse element order.</a>
|
||
|
<a name="923"><span class="lineNum"> 923 </span> : : */</a>
|
||
|
<a name="924"><span class="lineNum"> 924 </span> : : const_reverse_iterator</a>
|
||
|
<a name="925"><span class="lineNum"> 925 </span> : : crend() const noexcept</a>
|
||
|
<a name="926"><span class="lineNum"> 926 </span> : : { return const_reverse_iterator(this->begin()); }</a>
|
||
|
<a name="927"><span class="lineNum"> 927 </span> : : #endif</a>
|
||
|
<a name="928"><span class="lineNum"> 928 </span> : : </a>
|
||
|
<a name="929"><span class="lineNum"> 929 </span> : : public:</a>
|
||
|
<a name="930"><span class="lineNum"> 930 </span> : : // Capacity:</a>
|
||
|
<a name="931"><span class="lineNum"> 931 </span> : : /// Returns the number of characters in the string, not including any</a>
|
||
|
<a name="932"><span class="lineNum"> 932 </span> : : /// null-termination.</a>
|
||
|
<a name="933"><span class="lineNum"> 933 </span> : : size_type</a>
|
||
|
<a name="934"><span class="lineNum"> 934 </span> : : size() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="935"><span class="lineNum"> 935 </span> : : { return _M_string_length; }</a>
|
||
|
<a name="936"><span class="lineNum"> 936 </span> : : </a>
|
||
|
<a name="937"><span class="lineNum"> 937 </span> : : /// Returns the number of characters in the string, not including any</a>
|
||
|
<a name="938"><span class="lineNum"> 938 </span> : : /// null-termination.</a>
|
||
|
<a name="939"><span class="lineNum"> 939 </span> : : size_type</a>
|
||
|
<a name="940"><span class="lineNum"> 940 </span> : : length() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="941"><span class="lineNum"> 941 </span> : : { return _M_string_length; }</a>
|
||
|
<a name="942"><span class="lineNum"> 942 </span> : : </a>
|
||
|
<a name="943"><span class="lineNum"> 943 </span> : : /// Returns the size() of the largest possible %string.</a>
|
||
|
<a name="944"><span class="lineNum"> 944 </span> : : size_type</a>
|
||
|
<a name="945"><span class="lineNum"> 945 </span> : : max_size() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="946"><span class="lineNum"> 946 </span> : : { return (_Alloc_traits::max_size(_M_get_allocator()) - 1) / 2; }</a>
|
||
|
<a name="947"><span class="lineNum"> 947 </span> : : </a>
|
||
|
<a name="948"><span class="lineNum"> 948 </span> : : /**</a>
|
||
|
<a name="949"><span class="lineNum"> 949 </span> : : * @brief Resizes the %string to the specified number of characters.</a>
|
||
|
<a name="950"><span class="lineNum"> 950 </span> : : * @param __n Number of characters the %string should contain.</a>
|
||
|
<a name="951"><span class="lineNum"> 951 </span> : : * @param __c Character to fill any new elements.</a>
|
||
|
<a name="952"><span class="lineNum"> 952 </span> : : *</a>
|
||
|
<a name="953"><span class="lineNum"> 953 </span> : : * This function will %resize the %string to the specified</a>
|
||
|
<a name="954"><span class="lineNum"> 954 </span> : : * number of characters. If the number is smaller than the</a>
|
||
|
<a name="955"><span class="lineNum"> 955 </span> : : * %string's current size the %string is truncated, otherwise</a>
|
||
|
<a name="956"><span class="lineNum"> 956 </span> : : * the %string is extended and new elements are %set to @a __c.</a>
|
||
|
<a name="957"><span class="lineNum"> 957 </span> : : */</a>
|
||
|
<a name="958"><span class="lineNum"> 958 </span> : : void</a>
|
||
|
<a name="959"><span class="lineNum"> 959 </span> : : resize(size_type __n, _CharT __c);</a>
|
||
|
<a name="960"><span class="lineNum"> 960 </span> : : </a>
|
||
|
<a name="961"><span class="lineNum"> 961 </span> : : /**</a>
|
||
|
<a name="962"><span class="lineNum"> 962 </span> : : * @brief Resizes the %string to the specified number of characters.</a>
|
||
|
<a name="963"><span class="lineNum"> 963 </span> : : * @param __n Number of characters the %string should contain.</a>
|
||
|
<a name="964"><span class="lineNum"> 964 </span> : : *</a>
|
||
|
<a name="965"><span class="lineNum"> 965 </span> : : * This function will resize the %string to the specified length. If</a>
|
||
|
<a name="966"><span class="lineNum"> 966 </span> : : * the new size is smaller than the %string's current size the %string</a>
|
||
|
<a name="967"><span class="lineNum"> 967 </span> : : * is truncated, otherwise the %string is extended and new characters</a>
|
||
|
<a name="968"><span class="lineNum"> 968 </span> : : * are default-constructed. For basic types such as char, this means</a>
|
||
|
<a name="969"><span class="lineNum"> 969 </span> : : * setting them to 0.</a>
|
||
|
<a name="970"><span class="lineNum"> 970 </span> : : */</a>
|
||
|
<a name="971"><span class="lineNum"> 971 </span> : : void</a>
|
||
|
<a name="972"><span class="lineNum"> 972 </span> : : resize(size_type __n)</a>
|
||
|
<a name="973"><span class="lineNum"> 973 </span> : : { this->resize(__n, _CharT()); }</a>
|
||
|
<a name="974"><span class="lineNum"> 974 </span> : : </a>
|
||
|
<a name="975"><span class="lineNum"> 975 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="976"><span class="lineNum"> 976 </span> : : /// A non-binding request to reduce capacity() to size().</a>
|
||
|
<a name="977"><span class="lineNum"> 977 </span> : : void</a>
|
||
|
<a name="978"><span class="lineNum"> 978 </span> : : shrink_to_fit() noexcept</a>
|
||
|
<a name="979"><span class="lineNum"> 979 </span> : : {</a>
|
||
|
<a name="980"><span class="lineNum"> 980 </span> : : #if __cpp_exceptions</a>
|
||
|
<a name="981"><span class="lineNum"> 981 </span> : : if (capacity() > size())</a>
|
||
|
<a name="982"><span class="lineNum"> 982 </span> : : {</a>
|
||
|
<a name="983"><span class="lineNum"> 983 </span> : : try</a>
|
||
|
<a name="984"><span class="lineNum"> 984 </span> : : { reserve(0); }</a>
|
||
|
<a name="985"><span class="lineNum"> 985 </span> : : catch(...)</a>
|
||
|
<a name="986"><span class="lineNum"> 986 </span> : : { }</a>
|
||
|
<a name="987"><span class="lineNum"> 987 </span> : : }</a>
|
||
|
<a name="988"><span class="lineNum"> 988 </span> : : #endif</a>
|
||
|
<a name="989"><span class="lineNum"> 989 </span> : : }</a>
|
||
|
<a name="990"><span class="lineNum"> 990 </span> : : #endif</a>
|
||
|
<a name="991"><span class="lineNum"> 991 </span> : : </a>
|
||
|
<a name="992"><span class="lineNum"> 992 </span> : : /**</a>
|
||
|
<a name="993"><span class="lineNum"> 993 </span> : : * Returns the total number of characters that the %string can hold</a>
|
||
|
<a name="994"><span class="lineNum"> 994 </span> : : * before needing to allocate more memory.</a>
|
||
|
<a name="995"><span class="lineNum"> 995 </span> : : */</a>
|
||
|
<a name="996"><span class="lineNum"> 996 </span> : : size_type</a>
|
||
|
<a name="997"><span class="lineNum"> 997 </span> : : capacity() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="998"><span class="lineNum"> 998 </span> : : {</a>
|
||
|
<a name="999"><span class="lineNum"> 999 </span> : : return _M_is_local() ? size_type(_S_local_capacity)</a>
|
||
|
<a name="1000"><span class="lineNum"> 1000 </span> : : : _M_allocated_capacity;</a>
|
||
|
<a name="1001"><span class="lineNum"> 1001 </span> : : }</a>
|
||
|
<a name="1002"><span class="lineNum"> 1002 </span> : : </a>
|
||
|
<a name="1003"><span class="lineNum"> 1003 </span> : : /**</a>
|
||
|
<a name="1004"><span class="lineNum"> 1004 </span> : : * @brief Attempt to preallocate enough memory for specified number of</a>
|
||
|
<a name="1005"><span class="lineNum"> 1005 </span> : : * characters.</a>
|
||
|
<a name="1006"><span class="lineNum"> 1006 </span> : : * @param __res_arg Number of characters required.</a>
|
||
|
<a name="1007"><span class="lineNum"> 1007 </span> : : * @throw std::length_error If @a __res_arg exceeds @c max_size().</a>
|
||
|
<a name="1008"><span class="lineNum"> 1008 </span> : : *</a>
|
||
|
<a name="1009"><span class="lineNum"> 1009 </span> : : * This function attempts to reserve enough memory for the</a>
|
||
|
<a name="1010"><span class="lineNum"> 1010 </span> : : * %string to hold the specified number of characters. If the</a>
|
||
|
<a name="1011"><span class="lineNum"> 1011 </span> : : * number requested is more than max_size(), length_error is</a>
|
||
|
<a name="1012"><span class="lineNum"> 1012 </span> : : * thrown.</a>
|
||
|
<a name="1013"><span class="lineNum"> 1013 </span> : : *</a>
|
||
|
<a name="1014"><span class="lineNum"> 1014 </span> : : * The advantage of this function is that if optimal code is a</a>
|
||
|
<a name="1015"><span class="lineNum"> 1015 </span> : : * necessity and the user can determine the string length that will be</a>
|
||
|
<a name="1016"><span class="lineNum"> 1016 </span> : : * required, the user can reserve the memory in %advance, and thus</a>
|
||
|
<a name="1017"><span class="lineNum"> 1017 </span> : : * prevent a possible reallocation of memory and copying of %string</a>
|
||
|
<a name="1018"><span class="lineNum"> 1018 </span> : : * data.</a>
|
||
|
<a name="1019"><span class="lineNum"> 1019 </span> : : */</a>
|
||
|
<a name="1020"><span class="lineNum"> 1020 </span> : : void</a>
|
||
|
<a name="1021"><span class="lineNum"> 1021 </span> : : reserve(size_type __res_arg = 0);</a>
|
||
|
<a name="1022"><span class="lineNum"> 1022 </span> : : </a>
|
||
|
<a name="1023"><span class="lineNum"> 1023 </span> : : /**</a>
|
||
|
<a name="1024"><span class="lineNum"> 1024 </span> : : * Erases the string, making it empty.</a>
|
||
|
<a name="1025"><span class="lineNum"> 1025 </span> : : */</a>
|
||
|
<a name="1026"><span class="lineNum"> 1026 </span> : : void</a>
|
||
|
<a name="1027"><span class="lineNum"> 1027 </span> : : clear() _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="1028"><span class="lineNum"> 1028 </span> : : { _M_set_length(0); }</a>
|
||
|
<a name="1029"><span class="lineNum"> 1029 </span> : : </a>
|
||
|
<a name="1030"><span class="lineNum"> 1030 </span> : : /**</a>
|
||
|
<a name="1031"><span class="lineNum"> 1031 </span> : : * Returns true if the %string is empty. Equivalent to </a>
|
||
|
<a name="1032"><span class="lineNum"> 1032 </span> : : * <code>*this == ""</code>.</a>
|
||
|
<a name="1033"><span class="lineNum"> 1033 </span> : : */</a>
|
||
|
<a name="1034"><span class="lineNum"> 1034 </span> : : _GLIBCXX_NODISCARD bool</a>
|
||
|
<a name="1035"><span class="lineNum"> 1035 </span> : : empty() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="1036"><span class="lineNum"> 1036 </span> : : { return this->size() == 0; }</a>
|
||
|
<a name="1037"><span class="lineNum"> 1037 </span> : : </a>
|
||
|
<a name="1038"><span class="lineNum"> 1038 </span> : : // Element access:</a>
|
||
|
<a name="1039"><span class="lineNum"> 1039 </span> : : /**</a>
|
||
|
<a name="1040"><span class="lineNum"> 1040 </span> : : * @brief Subscript access to the data contained in the %string.</a>
|
||
|
<a name="1041"><span class="lineNum"> 1041 </span> : : * @param __pos The index of the character to access.</a>
|
||
|
<a name="1042"><span class="lineNum"> 1042 </span> : : * @return Read-only (constant) reference to the character.</a>
|
||
|
<a name="1043"><span class="lineNum"> 1043 </span> : : *</a>
|
||
|
<a name="1044"><span class="lineNum"> 1044 </span> : : * This operator allows for easy, array-style, data access.</a>
|
||
|
<a name="1045"><span class="lineNum"> 1045 </span> : : * Note that data access with this operator is unchecked and</a>
|
||
|
<a name="1046"><span class="lineNum"> 1046 </span> : : * out_of_range lookups are not defined. (For checked lookups</a>
|
||
|
<a name="1047"><span class="lineNum"> 1047 </span> : : * see at().)</a>
|
||
|
<a name="1048"><span class="lineNum"> 1048 </span> : : */</a>
|
||
|
<a name="1049"><span class="lineNum"> 1049 </span> : : const_reference</a>
|
||
|
<a name="1050"><span class="lineNum"> 1050 </span> : : operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="1051"><span class="lineNum"> 1051 </span> : : {</a>
|
||
|
<a name="1052"><span class="lineNum"> 1052 </span> : : __glibcxx_assert(__pos <= size());</a>
|
||
|
<a name="1053"><span class="lineNum"> 1053 </span> : : return _M_data()[__pos];</a>
|
||
|
<a name="1054"><span class="lineNum"> 1054 </span> : : }</a>
|
||
|
<a name="1055"><span class="lineNum"> 1055 </span> : : </a>
|
||
|
<a name="1056"><span class="lineNum"> 1056 </span> : : /**</a>
|
||
|
<a name="1057"><span class="lineNum"> 1057 </span> : : * @brief Subscript access to the data contained in the %string.</a>
|
||
|
<a name="1058"><span class="lineNum"> 1058 </span> : : * @param __pos The index of the character to access.</a>
|
||
|
<a name="1059"><span class="lineNum"> 1059 </span> : : * @return Read/write reference to the character.</a>
|
||
|
<a name="1060"><span class="lineNum"> 1060 </span> : : *</a>
|
||
|
<a name="1061"><span class="lineNum"> 1061 </span> : : * This operator allows for easy, array-style, data access.</a>
|
||
|
<a name="1062"><span class="lineNum"> 1062 </span> : : * Note that data access with this operator is unchecked and</a>
|
||
|
<a name="1063"><span class="lineNum"> 1063 </span> : : * out_of_range lookups are not defined. (For checked lookups</a>
|
||
|
<a name="1064"><span class="lineNum"> 1064 </span> : : * see at().)</a>
|
||
|
<a name="1065"><span class="lineNum"> 1065 </span> : : */</a>
|
||
|
<a name="1066"><span class="lineNum"> 1066 </span> : : reference</a>
|
||
|
<a name="1067"><span class="lineNum"> 1067 </span> : : operator[](size_type __pos)</a>
|
||
|
<a name="1068"><span class="lineNum"> 1068 </span> : : {</a>
|
||
|
<a name="1069"><span class="lineNum"> 1069 </span> : : // Allow pos == size() both in C++98 mode, as v3 extension,</a>
|
||
|
<a name="1070"><span class="lineNum"> 1070 </span> : : // and in C++11 mode.</a>
|
||
|
<a name="1071"><span class="lineNum"> 1071 </span> : : __glibcxx_assert(__pos <= size());</a>
|
||
|
<a name="1072"><span class="lineNum"> 1072 </span> : : // In pedantic mode be strict in C++98 mode.</a>
|
||
|
<a name="1073"><span class="lineNum"> 1073 </span> : : _GLIBCXX_DEBUG_PEDASSERT(__cplusplus >= 201103L || __pos < size());</a>
|
||
|
<a name="1074"><span class="lineNum"> 1074 </span> : : return _M_data()[__pos];</a>
|
||
|
<a name="1075"><span class="lineNum"> 1075 </span> : : }</a>
|
||
|
<a name="1076"><span class="lineNum"> 1076 </span> : : </a>
|
||
|
<a name="1077"><span class="lineNum"> 1077 </span> : : /**</a>
|
||
|
<a name="1078"><span class="lineNum"> 1078 </span> : : * @brief Provides access to the data contained in the %string.</a>
|
||
|
<a name="1079"><span class="lineNum"> 1079 </span> : : * @param __n The index of the character to access.</a>
|
||
|
<a name="1080"><span class="lineNum"> 1080 </span> : : * @return Read-only (const) reference to the character.</a>
|
||
|
<a name="1081"><span class="lineNum"> 1081 </span> : : * @throw std::out_of_range If @a n is an invalid index.</a>
|
||
|
<a name="1082"><span class="lineNum"> 1082 </span> : : *</a>
|
||
|
<a name="1083"><span class="lineNum"> 1083 </span> : : * This function provides for safer data access. The parameter is</a>
|
||
|
<a name="1084"><span class="lineNum"> 1084 </span> : : * first checked that it is in the range of the string. The function</a>
|
||
|
<a name="1085"><span class="lineNum"> 1085 </span> : : * throws out_of_range if the check fails.</a>
|
||
|
<a name="1086"><span class="lineNum"> 1086 </span> : : */</a>
|
||
|
<a name="1087"><span class="lineNum"> 1087 </span> : : const_reference</a>
|
||
|
<a name="1088"><span class="lineNum"> 1088 </span> : : at(size_type __n) const</a>
|
||
|
<a name="1089"><span class="lineNum"> 1089 </span> : : {</a>
|
||
|
<a name="1090"><span class="lineNum"> 1090 </span> : : if (__n >= this->size())</a>
|
||
|
<a name="1091"><span class="lineNum"> 1091 </span> : : __throw_out_of_range_fmt(__N("basic_string::at: __n "</a>
|
||
|
<a name="1092"><span class="lineNum"> 1092 </span> : : "(which is %zu) >= this->size() "</a>
|
||
|
<a name="1093"><span class="lineNum"> 1093 </span> : : "(which is %zu)"),</a>
|
||
|
<a name="1094"><span class="lineNum"> 1094 </span> : : __n, this->size());</a>
|
||
|
<a name="1095"><span class="lineNum"> 1095 </span> : : return _M_data()[__n];</a>
|
||
|
<a name="1096"><span class="lineNum"> 1096 </span> : : }</a>
|
||
|
<a name="1097"><span class="lineNum"> 1097 </span> : : </a>
|
||
|
<a name="1098"><span class="lineNum"> 1098 </span> : : /**</a>
|
||
|
<a name="1099"><span class="lineNum"> 1099 </span> : : * @brief Provides access to the data contained in the %string.</a>
|
||
|
<a name="1100"><span class="lineNum"> 1100 </span> : : * @param __n The index of the character to access.</a>
|
||
|
<a name="1101"><span class="lineNum"> 1101 </span> : : * @return Read/write reference to the character.</a>
|
||
|
<a name="1102"><span class="lineNum"> 1102 </span> : : * @throw std::out_of_range If @a n is an invalid index.</a>
|
||
|
<a name="1103"><span class="lineNum"> 1103 </span> : : *</a>
|
||
|
<a name="1104"><span class="lineNum"> 1104 </span> : : * This function provides for safer data access. The parameter is</a>
|
||
|
<a name="1105"><span class="lineNum"> 1105 </span> : : * first checked that it is in the range of the string. The function</a>
|
||
|
<a name="1106"><span class="lineNum"> 1106 </span> : : * throws out_of_range if the check fails.</a>
|
||
|
<a name="1107"><span class="lineNum"> 1107 </span> : : */</a>
|
||
|
<a name="1108"><span class="lineNum"> 1108 </span> : : reference</a>
|
||
|
<a name="1109"><span class="lineNum"> 1109 </span> : : at(size_type __n)</a>
|
||
|
<a name="1110"><span class="lineNum"> 1110 </span> : : {</a>
|
||
|
<a name="1111"><span class="lineNum"> 1111 </span> : : if (__n >= size())</a>
|
||
|
<a name="1112"><span class="lineNum"> 1112 </span> : : __throw_out_of_range_fmt(__N("basic_string::at: __n "</a>
|
||
|
<a name="1113"><span class="lineNum"> 1113 </span> : : "(which is %zu) >= this->size() "</a>
|
||
|
<a name="1114"><span class="lineNum"> 1114 </span> : : "(which is %zu)"),</a>
|
||
|
<a name="1115"><span class="lineNum"> 1115 </span> : : __n, this->size());</a>
|
||
|
<a name="1116"><span class="lineNum"> 1116 </span> : : return _M_data()[__n];</a>
|
||
|
<a name="1117"><span class="lineNum"> 1117 </span> : : }</a>
|
||
|
<a name="1118"><span class="lineNum"> 1118 </span> : : </a>
|
||
|
<a name="1119"><span class="lineNum"> 1119 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="1120"><span class="lineNum"> 1120 </span> : : /**</a>
|
||
|
<a name="1121"><span class="lineNum"> 1121 </span> : : * Returns a read/write reference to the data at the first</a>
|
||
|
<a name="1122"><span class="lineNum"> 1122 </span> : : * element of the %string.</a>
|
||
|
<a name="1123"><span class="lineNum"> 1123 </span> : : */</a>
|
||
|
<a name="1124"><span class="lineNum"> 1124 </span> : : reference</a>
|
||
|
<a name="1125"><span class="lineNum"> 1125 </span> : : front() noexcept</a>
|
||
|
<a name="1126"><span class="lineNum"> 1126 </span> : : {</a>
|
||
|
<a name="1127"><span class="lineNum"> 1127 </span> : : __glibcxx_assert(!empty());</a>
|
||
|
<a name="1128"><span class="lineNum"> 1128 </span> : : return operator[](0);</a>
|
||
|
<a name="1129"><span class="lineNum"> 1129 </span> : : }</a>
|
||
|
<a name="1130"><span class="lineNum"> 1130 </span> : : </a>
|
||
|
<a name="1131"><span class="lineNum"> 1131 </span> : : /**</a>
|
||
|
<a name="1132"><span class="lineNum"> 1132 </span> : : * Returns a read-only (constant) reference to the data at the first</a>
|
||
|
<a name="1133"><span class="lineNum"> 1133 </span> : : * element of the %string.</a>
|
||
|
<a name="1134"><span class="lineNum"> 1134 </span> : : */</a>
|
||
|
<a name="1135"><span class="lineNum"> 1135 </span> : : const_reference</a>
|
||
|
<a name="1136"><span class="lineNum"> 1136 </span> : : front() const noexcept</a>
|
||
|
<a name="1137"><span class="lineNum"> 1137 </span> : : {</a>
|
||
|
<a name="1138"><span class="lineNum"> 1138 </span> : : __glibcxx_assert(!empty());</a>
|
||
|
<a name="1139"><span class="lineNum"> 1139 </span> : : return operator[](0);</a>
|
||
|
<a name="1140"><span class="lineNum"> 1140 </span> : : }</a>
|
||
|
<a name="1141"><span class="lineNum"> 1141 </span> : : </a>
|
||
|
<a name="1142"><span class="lineNum"> 1142 </span> : : /**</a>
|
||
|
<a name="1143"><span class="lineNum"> 1143 </span> : : * Returns a read/write reference to the data at the last</a>
|
||
|
<a name="1144"><span class="lineNum"> 1144 </span> : : * element of the %string.</a>
|
||
|
<a name="1145"><span class="lineNum"> 1145 </span> : : */</a>
|
||
|
<a name="1146"><span class="lineNum"> 1146 </span> : : reference</a>
|
||
|
<a name="1147"><span class="lineNum"> 1147 </span> : : back() noexcept</a>
|
||
|
<a name="1148"><span class="lineNum"> 1148 </span> : : {</a>
|
||
|
<a name="1149"><span class="lineNum"> 1149 </span> : : __glibcxx_assert(!empty());</a>
|
||
|
<a name="1150"><span class="lineNum"> 1150 </span> : : return operator[](this->size() - 1);</a>
|
||
|
<a name="1151"><span class="lineNum"> 1151 </span> : : }</a>
|
||
|
<a name="1152"><span class="lineNum"> 1152 </span> : : </a>
|
||
|
<a name="1153"><span class="lineNum"> 1153 </span> : : /**</a>
|
||
|
<a name="1154"><span class="lineNum"> 1154 </span> : : * Returns a read-only (constant) reference to the data at the</a>
|
||
|
<a name="1155"><span class="lineNum"> 1155 </span> : : * last element of the %string.</a>
|
||
|
<a name="1156"><span class="lineNum"> 1156 </span> : : */</a>
|
||
|
<a name="1157"><span class="lineNum"> 1157 </span> : : const_reference</a>
|
||
|
<a name="1158"><span class="lineNum"> 1158 </span> : : back() const noexcept</a>
|
||
|
<a name="1159"><span class="lineNum"> 1159 </span> : : {</a>
|
||
|
<a name="1160"><span class="lineNum"> 1160 </span> : : __glibcxx_assert(!empty());</a>
|
||
|
<a name="1161"><span class="lineNum"> 1161 </span> : : return operator[](this->size() - 1);</a>
|
||
|
<a name="1162"><span class="lineNum"> 1162 </span> : : }</a>
|
||
|
<a name="1163"><span class="lineNum"> 1163 </span> : : #endif</a>
|
||
|
<a name="1164"><span class="lineNum"> 1164 </span> : : </a>
|
||
|
<a name="1165"><span class="lineNum"> 1165 </span> : : // Modifiers:</a>
|
||
|
<a name="1166"><span class="lineNum"> 1166 </span> : : /**</a>
|
||
|
<a name="1167"><span class="lineNum"> 1167 </span> : : * @brief Append a string to this string.</a>
|
||
|
<a name="1168"><span class="lineNum"> 1168 </span> : : * @param __str The string to append.</a>
|
||
|
<a name="1169"><span class="lineNum"> 1169 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1170"><span class="lineNum"> 1170 </span> : : */</a>
|
||
|
<a name="1171"><span class="lineNum"> 1171 </span> : : basic_string&</a>
|
||
|
<a name="1172"><span class="lineNum"> 1172 </span> : : operator+=(const basic_string& __str)</a>
|
||
|
<a name="1173"><span class="lineNum"> 1173 </span> : : { return this->append(__str); }</a>
|
||
|
<a name="1174"><span class="lineNum"> 1174 </span> : : </a>
|
||
|
<a name="1175"><span class="lineNum"> 1175 </span> : : /**</a>
|
||
|
<a name="1176"><span class="lineNum"> 1176 </span> : : * @brief Append a C string.</a>
|
||
|
<a name="1177"><span class="lineNum"> 1177 </span> : : * @param __s The C string to append.</a>
|
||
|
<a name="1178"><span class="lineNum"> 1178 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1179"><span class="lineNum"> 1179 </span> : : */</a>
|
||
|
<a name="1180"><span class="lineNum"> 1180 </span> : : basic_string&</a>
|
||
|
<a name="1181"><span class="lineNum"> 1181 </span> : : operator+=(const _CharT* __s)</a>
|
||
|
<a name="1182"><span class="lineNum"> 1182 </span> : : { return this->append(__s); }</a>
|
||
|
<a name="1183"><span class="lineNum"> 1183 </span> : : </a>
|
||
|
<a name="1184"><span class="lineNum"> 1184 </span> : : /**</a>
|
||
|
<a name="1185"><span class="lineNum"> 1185 </span> : : * @brief Append a character.</a>
|
||
|
<a name="1186"><span class="lineNum"> 1186 </span> : : * @param __c The character to append.</a>
|
||
|
<a name="1187"><span class="lineNum"> 1187 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1188"><span class="lineNum"> 1188 </span> : : */</a>
|
||
|
<a name="1189"><span class="lineNum"> 1189 </span> : : basic_string&</a>
|
||
|
<a name="1190"><span class="lineNum"> 1190 </span> : : operator+=(_CharT __c)</a>
|
||
|
<a name="1191"><span class="lineNum"> 1191 </span> : : {</a>
|
||
|
<a name="1192"><span class="lineNum"> 1192 </span> : : this->push_back(__c);</a>
|
||
|
<a name="1193"><span class="lineNum"> 1193 </span> : : return *this;</a>
|
||
|
<a name="1194"><span class="lineNum"> 1194 </span> : : }</a>
|
||
|
<a name="1195"><span class="lineNum"> 1195 </span> : : </a>
|
||
|
<a name="1196"><span class="lineNum"> 1196 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="1197"><span class="lineNum"> 1197 </span> : : /**</a>
|
||
|
<a name="1198"><span class="lineNum"> 1198 </span> : : * @brief Append an initializer_list of characters.</a>
|
||
|
<a name="1199"><span class="lineNum"> 1199 </span> : : * @param __l The initializer_list of characters to be appended.</a>
|
||
|
<a name="1200"><span class="lineNum"> 1200 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1201"><span class="lineNum"> 1201 </span> : : */</a>
|
||
|
<a name="1202"><span class="lineNum"> 1202 </span> : : basic_string&</a>
|
||
|
<a name="1203"><span class="lineNum"> 1203 </span> : : operator+=(initializer_list<_CharT> __l)</a>
|
||
|
<a name="1204"><span class="lineNum"> 1204 </span> : : { return this->append(__l.begin(), __l.size()); }</a>
|
||
|
<a name="1205"><span class="lineNum"> 1205 </span> : : #endif // C++11</a>
|
||
|
<a name="1206"><span class="lineNum"> 1206 </span> : : </a>
|
||
|
<a name="1207"><span class="lineNum"> 1207 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="1208"><span class="lineNum"> 1208 </span> : : /**</a>
|
||
|
<a name="1209"><span class="lineNum"> 1209 </span> : : * @brief Append a string_view.</a>
|
||
|
<a name="1210"><span class="lineNum"> 1210 </span> : : * @param __svt An object convertible to string_view to be appended.</a>
|
||
|
<a name="1211"><span class="lineNum"> 1211 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1212"><span class="lineNum"> 1212 </span> : : */</a>
|
||
|
<a name="1213"><span class="lineNum"> 1213 </span> : : template<typename _Tp></a>
|
||
|
<a name="1214"><span class="lineNum"> 1214 </span> : : _If_sv<_Tp, basic_string&></a>
|
||
|
<a name="1215"><span class="lineNum"> 1215 </span> : : operator+=(const _Tp& __svt)</a>
|
||
|
<a name="1216"><span class="lineNum"> 1216 </span> : : { return this->append(__svt); }</a>
|
||
|
<a name="1217"><span class="lineNum"> 1217 </span> : : #endif // C++17</a>
|
||
|
<a name="1218"><span class="lineNum"> 1218 </span> : : </a>
|
||
|
<a name="1219"><span class="lineNum"> 1219 </span> : : /**</a>
|
||
|
<a name="1220"><span class="lineNum"> 1220 </span> : : * @brief Append a string to this string.</a>
|
||
|
<a name="1221"><span class="lineNum"> 1221 </span> : : * @param __str The string to append.</a>
|
||
|
<a name="1222"><span class="lineNum"> 1222 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1223"><span class="lineNum"> 1223 </span> : : */</a>
|
||
|
<a name="1224"><span class="lineNum"> 1224 </span> : : basic_string&</a>
|
||
|
<a name="1225"><span class="lineNum"> 1225 </span> : : append(const basic_string& __str)</a>
|
||
|
<a name="1226"><span class="lineNum"> 1226 </span> : : { return _M_append(__str._M_data(), __str.size()); }</a>
|
||
|
<a name="1227"><span class="lineNum"> 1227 </span> : : </a>
|
||
|
<a name="1228"><span class="lineNum"> 1228 </span> : : /**</a>
|
||
|
<a name="1229"><span class="lineNum"> 1229 </span> : : * @brief Append a substring.</a>
|
||
|
<a name="1230"><span class="lineNum"> 1230 </span> : : * @param __str The string to append.</a>
|
||
|
<a name="1231"><span class="lineNum"> 1231 </span> : : * @param __pos Index of the first character of str to append.</a>
|
||
|
<a name="1232"><span class="lineNum"> 1232 </span> : : * @param __n The number of characters to append.</a>
|
||
|
<a name="1233"><span class="lineNum"> 1233 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1234"><span class="lineNum"> 1234 </span> : : * @throw std::out_of_range if @a __pos is not a valid index.</a>
|
||
|
<a name="1235"><span class="lineNum"> 1235 </span> : : *</a>
|
||
|
<a name="1236"><span class="lineNum"> 1236 </span> : : * This function appends @a __n characters from @a __str</a>
|
||
|
<a name="1237"><span class="lineNum"> 1237 </span> : : * starting at @a __pos to this string. If @a __n is is larger</a>
|
||
|
<a name="1238"><span class="lineNum"> 1238 </span> : : * than the number of available characters in @a __str, the</a>
|
||
|
<a name="1239"><span class="lineNum"> 1239 </span> : : * remainder of @a __str is appended.</a>
|
||
|
<a name="1240"><span class="lineNum"> 1240 </span> : : */</a>
|
||
|
<a name="1241"><span class="lineNum"> 1241 </span> : : basic_string&</a>
|
||
|
<a name="1242"><span class="lineNum"> 1242 </span> : : append(const basic_string& __str, size_type __pos, size_type __n = npos)</a>
|
||
|
<a name="1243"><span class="lineNum"> 1243 </span> : : { return _M_append(__str._M_data()</a>
|
||
|
<a name="1244"><span class="lineNum"> 1244 </span> : : + __str._M_check(__pos, "basic_string::append"),</a>
|
||
|
<a name="1245"><span class="lineNum"> 1245 </span> : : __str._M_limit(__pos, __n)); }</a>
|
||
|
<a name="1246"><span class="lineNum"> 1246 </span> : : </a>
|
||
|
<a name="1247"><span class="lineNum"> 1247 </span> : : /**</a>
|
||
|
<a name="1248"><span class="lineNum"> 1248 </span> : : * @brief Append a C substring.</a>
|
||
|
<a name="1249"><span class="lineNum"> 1249 </span> : : * @param __s The C string to append.</a>
|
||
|
<a name="1250"><span class="lineNum"> 1250 </span> : : * @param __n The number of characters to append.</a>
|
||
|
<a name="1251"><span class="lineNum"> 1251 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1252"><span class="lineNum"> 1252 </span> : : */</a>
|
||
|
<a name="1253"><span class="lineNum"> 1253 </span> : : basic_string&</a>
|
||
|
<a name="1254"><span class="lineNum"> 1254 </span> : : append(const _CharT* __s, size_type __n)</a>
|
||
|
<a name="1255"><span class="lineNum"> 1255 </span> : : {</a>
|
||
|
<a name="1256"><span class="lineNum"> 1256 </span> : : __glibcxx_requires_string_len(__s, __n);</a>
|
||
|
<a name="1257"><span class="lineNum"> 1257 </span> : : _M_check_length(size_type(0), __n, "basic_string::append");</a>
|
||
|
<a name="1258"><span class="lineNum"> 1258 </span> : : return _M_append(__s, __n);</a>
|
||
|
<a name="1259"><span class="lineNum"> 1259 </span> : : }</a>
|
||
|
<a name="1260"><span class="lineNum"> 1260 </span> : : </a>
|
||
|
<a name="1261"><span class="lineNum"> 1261 </span> : : /**</a>
|
||
|
<a name="1262"><span class="lineNum"> 1262 </span> : : * @brief Append a C string.</a>
|
||
|
<a name="1263"><span class="lineNum"> 1263 </span> : : * @param __s The C string to append.</a>
|
||
|
<a name="1264"><span class="lineNum"> 1264 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1265"><span class="lineNum"> 1265 </span> : : */</a>
|
||
|
<a name="1266"><span class="lineNum"> 1266 </span> : : basic_string&</a>
|
||
|
<a name="1267"><span class="lineNum"> 1267 </span> : : append(const _CharT* __s)</a>
|
||
|
<a name="1268"><span class="lineNum"> 1268 </span> : : {</a>
|
||
|
<a name="1269"><span class="lineNum"> 1269 </span> : : __glibcxx_requires_string(__s);</a>
|
||
|
<a name="1270"><span class="lineNum"> 1270 </span> : : const size_type __n = traits_type::length(__s);</a>
|
||
|
<a name="1271"><span class="lineNum"> 1271 </span> : : _M_check_length(size_type(0), __n, "basic_string::append");</a>
|
||
|
<a name="1272"><span class="lineNum"> 1272 </span> : : return _M_append(__s, __n);</a>
|
||
|
<a name="1273"><span class="lineNum"> 1273 </span> : : }</a>
|
||
|
<a name="1274"><span class="lineNum"> 1274 </span> : : </a>
|
||
|
<a name="1275"><span class="lineNum"> 1275 </span> : : /**</a>
|
||
|
<a name="1276"><span class="lineNum"> 1276 </span> : : * @brief Append multiple characters.</a>
|
||
|
<a name="1277"><span class="lineNum"> 1277 </span> : : * @param __n The number of characters to append.</a>
|
||
|
<a name="1278"><span class="lineNum"> 1278 </span> : : * @param __c The character to use.</a>
|
||
|
<a name="1279"><span class="lineNum"> 1279 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1280"><span class="lineNum"> 1280 </span> : : *</a>
|
||
|
<a name="1281"><span class="lineNum"> 1281 </span> : : * Appends __n copies of __c to this string.</a>
|
||
|
<a name="1282"><span class="lineNum"> 1282 </span> : : */</a>
|
||
|
<a name="1283"><span class="lineNum"> 1283 </span> : : basic_string&</a>
|
||
|
<a name="1284"><span class="lineNum"> 1284 </span> : : append(size_type __n, _CharT __c)</a>
|
||
|
<a name="1285"><span class="lineNum"> 1285 </span> : : { return _M_replace_aux(this->size(), size_type(0), __n, __c); }</a>
|
||
|
<a name="1286"><span class="lineNum"> 1286 </span> : : </a>
|
||
|
<a name="1287"><span class="lineNum"> 1287 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="1288"><span class="lineNum"> 1288 </span> : : /**</a>
|
||
|
<a name="1289"><span class="lineNum"> 1289 </span> : : * @brief Append an initializer_list of characters.</a>
|
||
|
<a name="1290"><span class="lineNum"> 1290 </span> : : * @param __l The initializer_list of characters to append.</a>
|
||
|
<a name="1291"><span class="lineNum"> 1291 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1292"><span class="lineNum"> 1292 </span> : : */</a>
|
||
|
<a name="1293"><span class="lineNum"> 1293 </span> : : basic_string&</a>
|
||
|
<a name="1294"><span class="lineNum"> 1294 </span> : : append(initializer_list<_CharT> __l)</a>
|
||
|
<a name="1295"><span class="lineNum"> 1295 </span> : : { return this->append(__l.begin(), __l.size()); }</a>
|
||
|
<a name="1296"><span class="lineNum"> 1296 </span> : : #endif // C++11</a>
|
||
|
<a name="1297"><span class="lineNum"> 1297 </span> : : </a>
|
||
|
<a name="1298"><span class="lineNum"> 1298 </span> : : /**</a>
|
||
|
<a name="1299"><span class="lineNum"> 1299 </span> : : * @brief Append a range of characters.</a>
|
||
|
<a name="1300"><span class="lineNum"> 1300 </span> : : * @param __first Iterator referencing the first character to append.</a>
|
||
|
<a name="1301"><span class="lineNum"> 1301 </span> : : * @param __last Iterator marking the end of the range.</a>
|
||
|
<a name="1302"><span class="lineNum"> 1302 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1303"><span class="lineNum"> 1303 </span> : : *</a>
|
||
|
<a name="1304"><span class="lineNum"> 1304 </span> : : * Appends characters in the range [__first,__last) to this string.</a>
|
||
|
<a name="1305"><span class="lineNum"> 1305 </span> : : */</a>
|
||
|
<a name="1306"><span class="lineNum"> 1306 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="1307"><span class="lineNum"> 1307 </span> : : template<class _InputIterator,</a>
|
||
|
<a name="1308"><span class="lineNum"> 1308 </span> : : typename = std::_RequireInputIter<_InputIterator>></a>
|
||
|
<a name="1309"><span class="lineNum"> 1309 </span> : : #else</a>
|
||
|
<a name="1310"><span class="lineNum"> 1310 </span> : : template<class _InputIterator></a>
|
||
|
<a name="1311"><span class="lineNum"> 1311 </span> : : #endif</a>
|
||
|
<a name="1312"><span class="lineNum"> 1312 </span> : : basic_string&</a>
|
||
|
<a name="1313"><span class="lineNum"> 1313 </span> : : append(_InputIterator __first, _InputIterator __last)</a>
|
||
|
<a name="1314"><span class="lineNum"> 1314 </span> : : { return this->replace(end(), end(), __first, __last); }</a>
|
||
|
<a name="1315"><span class="lineNum"> 1315 </span> : : </a>
|
||
|
<a name="1316"><span class="lineNum"> 1316 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="1317"><span class="lineNum"> 1317 </span> : : /**</a>
|
||
|
<a name="1318"><span class="lineNum"> 1318 </span> : : * @brief Append a string_view.</a>
|
||
|
<a name="1319"><span class="lineNum"> 1319 </span> : : * @param __svt An object convertible to string_view to be appended.</a>
|
||
|
<a name="1320"><span class="lineNum"> 1320 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1321"><span class="lineNum"> 1321 </span> : : */</a>
|
||
|
<a name="1322"><span class="lineNum"> 1322 </span> : : template<typename _Tp></a>
|
||
|
<a name="1323"><span class="lineNum"> 1323 </span> : : _If_sv<_Tp, basic_string&></a>
|
||
|
<a name="1324"><span class="lineNum"> 1324 </span> : : append(const _Tp& __svt)</a>
|
||
|
<a name="1325"><span class="lineNum"> 1325 </span> : : {</a>
|
||
|
<a name="1326"><span class="lineNum"> 1326 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="1327"><span class="lineNum"> 1327 </span> : : return this->append(__sv.data(), __sv.size());</a>
|
||
|
<a name="1328"><span class="lineNum"> 1328 </span> : : }</a>
|
||
|
<a name="1329"><span class="lineNum"> 1329 </span> : : </a>
|
||
|
<a name="1330"><span class="lineNum"> 1330 </span> : : /**</a>
|
||
|
<a name="1331"><span class="lineNum"> 1331 </span> : : * @brief Append a range of characters from a string_view.</a>
|
||
|
<a name="1332"><span class="lineNum"> 1332 </span> : : * @param __svt An object convertible to string_view to be appended from.</a>
|
||
|
<a name="1333"><span class="lineNum"> 1333 </span> : : * @param __pos The position in the string_view to append from.</a>
|
||
|
<a name="1334"><span class="lineNum"> 1334 </span> : : * @param __n The number of characters to append from the string_view.</a>
|
||
|
<a name="1335"><span class="lineNum"> 1335 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1336"><span class="lineNum"> 1336 </span> : : */</a>
|
||
|
<a name="1337"><span class="lineNum"> 1337 </span> : : template<typename _Tp></a>
|
||
|
<a name="1338"><span class="lineNum"> 1338 </span> : : _If_sv<_Tp, basic_string&></a>
|
||
|
<a name="1339"><span class="lineNum"> 1339 </span> : : append(const _Tp& __svt, size_type __pos, size_type __n = npos)</a>
|
||
|
<a name="1340"><span class="lineNum"> 1340 </span> : : {</a>
|
||
|
<a name="1341"><span class="lineNum"> 1341 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="1342"><span class="lineNum"> 1342 </span> : : return _M_append(__sv.data()</a>
|
||
|
<a name="1343"><span class="lineNum"> 1343 </span> : : + std::__sv_check(__sv.size(), __pos, "basic_string::append"),</a>
|
||
|
<a name="1344"><span class="lineNum"> 1344 </span> : : std::__sv_limit(__sv.size(), __pos, __n));</a>
|
||
|
<a name="1345"><span class="lineNum"> 1345 </span> : : }</a>
|
||
|
<a name="1346"><span class="lineNum"> 1346 </span> : : #endif // C++17</a>
|
||
|
<a name="1347"><span class="lineNum"> 1347 </span> : : </a>
|
||
|
<a name="1348"><span class="lineNum"> 1348 </span> : : /**</a>
|
||
|
<a name="1349"><span class="lineNum"> 1349 </span> : : * @brief Append a single character.</a>
|
||
|
<a name="1350"><span class="lineNum"> 1350 </span> : : * @param __c Character to append.</a>
|
||
|
<a name="1351"><span class="lineNum"> 1351 </span> : : */</a>
|
||
|
<a name="1352"><span class="lineNum"> 1352 </span> : : void</a>
|
||
|
<a name="1353"><span class="lineNum"> 1353 </span> : : push_back(_CharT __c)</a>
|
||
|
<a name="1354"><span class="lineNum"> 1354 </span> : : {</a>
|
||
|
<a name="1355"><span class="lineNum"> 1355 </span> : : const size_type __size = this->size();</a>
|
||
|
<a name="1356"><span class="lineNum"> 1356 </span> : : if (__size + 1 > this->capacity())</a>
|
||
|
<a name="1357"><span class="lineNum"> 1357 </span> : : this->_M_mutate(__size, size_type(0), 0, size_type(1));</a>
|
||
|
<a name="1358"><span class="lineNum"> 1358 </span> : : traits_type::assign(this->_M_data()[__size], __c);</a>
|
||
|
<a name="1359"><span class="lineNum"> 1359 </span> : : this->_M_set_length(__size + 1);</a>
|
||
|
<a name="1360"><span class="lineNum"> 1360 </span> : : }</a>
|
||
|
<a name="1361"><span class="lineNum"> 1361 </span> : : </a>
|
||
|
<a name="1362"><span class="lineNum"> 1362 </span> : : /**</a>
|
||
|
<a name="1363"><span class="lineNum"> 1363 </span> : : * @brief Set value to contents of another string.</a>
|
||
|
<a name="1364"><span class="lineNum"> 1364 </span> : : * @param __str Source string to use.</a>
|
||
|
<a name="1365"><span class="lineNum"> 1365 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1366"><span class="lineNum"> 1366 </span> : : */</a>
|
||
|
<a name="1367"><span class="lineNum"> 1367 </span> : : basic_string&</a>
|
||
|
<a name="1368"><span class="lineNum"> 1368 </span> : : assign(const basic_string& __str)</a>
|
||
|
<a name="1369"><span class="lineNum"> 1369 </span> : : {</a>
|
||
|
<a name="1370"><span class="lineNum"> 1370 </span> : : this->_M_assign(__str);</a>
|
||
|
<a name="1371"><span class="lineNum"> 1371 </span> : : return *this;</a>
|
||
|
<a name="1372"><span class="lineNum"> 1372 </span> : : }</a>
|
||
|
<a name="1373"><span class="lineNum"> 1373 </span> : : </a>
|
||
|
<a name="1374"><span class="lineNum"> 1374 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="1375"><span class="lineNum"> 1375 </span> : : /**</a>
|
||
|
<a name="1376"><span class="lineNum"> 1376 </span> : : * @brief Set value to contents of another string.</a>
|
||
|
<a name="1377"><span class="lineNum"> 1377 </span> : : * @param __str Source string to use.</a>
|
||
|
<a name="1378"><span class="lineNum"> 1378 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1379"><span class="lineNum"> 1379 </span> : : *</a>
|
||
|
<a name="1380"><span class="lineNum"> 1380 </span> : : * This function sets this string to the exact contents of @a __str.</a>
|
||
|
<a name="1381"><span class="lineNum"> 1381 </span> : : * @a __str is a valid, but unspecified string.</a>
|
||
|
<a name="1382"><span class="lineNum"> 1382 </span> : : */</a>
|
||
|
<a name="1383"><span class="lineNum"> 1383 </span> : : basic_string&</a>
|
||
|
<a name="1384"><span class="lineNum"> 1384 </span> : : assign(basic_string&& __str)</a>
|
||
|
<a name="1385"><span class="lineNum"> 1385 </span> : : noexcept(_Alloc_traits::_S_nothrow_move())</a>
|
||
|
<a name="1386"><span class="lineNum"> 1386 </span> : : {</a>
|
||
|
<a name="1387"><span class="lineNum"> 1387 </span> : : // _GLIBCXX_RESOLVE_LIB_DEFECTS</a>
|
||
|
<a name="1388"><span class="lineNum"> 1388 </span> : : // 2063. Contradictory requirements for string move assignment</a>
|
||
|
<a name="1389"><span class="lineNum"> 1389 </span> : : return *this = std::move(__str);</a>
|
||
|
<a name="1390"><span class="lineNum"> 1390 </span> : : }</a>
|
||
|
<a name="1391"><span class="lineNum"> 1391 </span> : : #endif // C++11</a>
|
||
|
<a name="1392"><span class="lineNum"> 1392 </span> : : </a>
|
||
|
<a name="1393"><span class="lineNum"> 1393 </span> : : /**</a>
|
||
|
<a name="1394"><span class="lineNum"> 1394 </span> : : * @brief Set value to a substring of a string.</a>
|
||
|
<a name="1395"><span class="lineNum"> 1395 </span> : : * @param __str The string to use.</a>
|
||
|
<a name="1396"><span class="lineNum"> 1396 </span> : : * @param __pos Index of the first character of str.</a>
|
||
|
<a name="1397"><span class="lineNum"> 1397 </span> : : * @param __n Number of characters to use.</a>
|
||
|
<a name="1398"><span class="lineNum"> 1398 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1399"><span class="lineNum"> 1399 </span> : : * @throw std::out_of_range if @a pos is not a valid index.</a>
|
||
|
<a name="1400"><span class="lineNum"> 1400 </span> : : *</a>
|
||
|
<a name="1401"><span class="lineNum"> 1401 </span> : : * This function sets this string to the substring of @a __str</a>
|
||
|
<a name="1402"><span class="lineNum"> 1402 </span> : : * consisting of @a __n characters at @a __pos. If @a __n is</a>
|
||
|
<a name="1403"><span class="lineNum"> 1403 </span> : : * is larger than the number of available characters in @a</a>
|
||
|
<a name="1404"><span class="lineNum"> 1404 </span> : : * __str, the remainder of @a __str is used.</a>
|
||
|
<a name="1405"><span class="lineNum"> 1405 </span> : : */</a>
|
||
|
<a name="1406"><span class="lineNum"> 1406 </span> : : basic_string&</a>
|
||
|
<a name="1407"><span class="lineNum"> 1407 </span> : : assign(const basic_string& __str, size_type __pos, size_type __n = npos)</a>
|
||
|
<a name="1408"><span class="lineNum"> 1408 </span> : : { return _M_replace(size_type(0), this->size(), __str._M_data()</a>
|
||
|
<a name="1409"><span class="lineNum"> 1409 </span> : : + __str._M_check(__pos, "basic_string::assign"),</a>
|
||
|
<a name="1410"><span class="lineNum"> 1410 </span> : : __str._M_limit(__pos, __n)); }</a>
|
||
|
<a name="1411"><span class="lineNum"> 1411 </span> : : </a>
|
||
|
<a name="1412"><span class="lineNum"> 1412 </span> : : /**</a>
|
||
|
<a name="1413"><span class="lineNum"> 1413 </span> : : * @brief Set value to a C substring.</a>
|
||
|
<a name="1414"><span class="lineNum"> 1414 </span> : : * @param __s The C string to use.</a>
|
||
|
<a name="1415"><span class="lineNum"> 1415 </span> : : * @param __n Number of characters to use.</a>
|
||
|
<a name="1416"><span class="lineNum"> 1416 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1417"><span class="lineNum"> 1417 </span> : : *</a>
|
||
|
<a name="1418"><span class="lineNum"> 1418 </span> : : * This function sets the value of this string to the first @a __n</a>
|
||
|
<a name="1419"><span class="lineNum"> 1419 </span> : : * characters of @a __s. If @a __n is is larger than the number of</a>
|
||
|
<a name="1420"><span class="lineNum"> 1420 </span> : : * available characters in @a __s, the remainder of @a __s is used.</a>
|
||
|
<a name="1421"><span class="lineNum"> 1421 </span> : : */</a>
|
||
|
<a name="1422"><span class="lineNum"> 1422 </span> : : basic_string&</a>
|
||
|
<a name="1423"><span class="lineNum"> 1423 </span> : : assign(const _CharT* __s, size_type __n)</a>
|
||
|
<a name="1424"><span class="lineNum"> 1424 </span> : : {</a>
|
||
|
<a name="1425"><span class="lineNum"> 1425 </span> : : __glibcxx_requires_string_len(__s, __n);</a>
|
||
|
<a name="1426"><span class="lineNum"> 1426 </span> : : return _M_replace(size_type(0), this->size(), __s, __n);</a>
|
||
|
<a name="1427"><span class="lineNum"> 1427 </span> : : }</a>
|
||
|
<a name="1428"><span class="lineNum"> 1428 </span> : : </a>
|
||
|
<a name="1429"><span class="lineNum"> 1429 </span> : : /**</a>
|
||
|
<a name="1430"><span class="lineNum"> 1430 </span> : : * @brief Set value to contents of a C string.</a>
|
||
|
<a name="1431"><span class="lineNum"> 1431 </span> : : * @param __s The C string to use.</a>
|
||
|
<a name="1432"><span class="lineNum"> 1432 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1433"><span class="lineNum"> 1433 </span> : : *</a>
|
||
|
<a name="1434"><span class="lineNum"> 1434 </span> : : * This function sets the value of this string to the value of @a __s.</a>
|
||
|
<a name="1435"><span class="lineNum"> 1435 </span> : : * The data is copied, so there is no dependence on @a __s once the</a>
|
||
|
<a name="1436"><span class="lineNum"> 1436 </span> : : * function returns.</a>
|
||
|
<a name="1437"><span class="lineNum"> 1437 </span> : : */</a>
|
||
|
<a name="1438"><span class="lineNum"> 1438 </span> : : basic_string&</a>
|
||
|
<a name="1439"><span class="lineNum"> 1439 </span> : : assign(const _CharT* __s)</a>
|
||
|
<a name="1440"><span class="lineNum"> 1440 </span> : : {</a>
|
||
|
<a name="1441"><span class="lineNum"> 1441 </span> : : __glibcxx_requires_string(__s);</a>
|
||
|
<a name="1442"><span class="lineNum"> 1442 </span> : : return _M_replace(size_type(0), this->size(), __s,</a>
|
||
|
<a name="1443"><span class="lineNum"> 1443 </span> : : traits_type::length(__s));</a>
|
||
|
<a name="1444"><span class="lineNum"> 1444 </span> : : }</a>
|
||
|
<a name="1445"><span class="lineNum"> 1445 </span> : : </a>
|
||
|
<a name="1446"><span class="lineNum"> 1446 </span> : : /**</a>
|
||
|
<a name="1447"><span class="lineNum"> 1447 </span> : : * @brief Set value to multiple characters.</a>
|
||
|
<a name="1448"><span class="lineNum"> 1448 </span> : : * @param __n Length of the resulting string.</a>
|
||
|
<a name="1449"><span class="lineNum"> 1449 </span> : : * @param __c The character to use.</a>
|
||
|
<a name="1450"><span class="lineNum"> 1450 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1451"><span class="lineNum"> 1451 </span> : : *</a>
|
||
|
<a name="1452"><span class="lineNum"> 1452 </span> : : * This function sets the value of this string to @a __n copies of</a>
|
||
|
<a name="1453"><span class="lineNum"> 1453 </span> : : * character @a __c.</a>
|
||
|
<a name="1454"><span class="lineNum"> 1454 </span> : : */</a>
|
||
|
<a name="1455"><span class="lineNum"> 1455 </span> : : basic_string&</a>
|
||
|
<a name="1456"><span class="lineNum"> 1456 </span> : : assign(size_type __n, _CharT __c)</a>
|
||
|
<a name="1457"><span class="lineNum"> 1457 </span> : : { return _M_replace_aux(size_type(0), this->size(), __n, __c); }</a>
|
||
|
<a name="1458"><span class="lineNum"> 1458 </span> : : </a>
|
||
|
<a name="1459"><span class="lineNum"> 1459 </span> : : /**</a>
|
||
|
<a name="1460"><span class="lineNum"> 1460 </span> : : * @brief Set value to a range of characters.</a>
|
||
|
<a name="1461"><span class="lineNum"> 1461 </span> : : * @param __first Iterator referencing the first character to append.</a>
|
||
|
<a name="1462"><span class="lineNum"> 1462 </span> : : * @param __last Iterator marking the end of the range.</a>
|
||
|
<a name="1463"><span class="lineNum"> 1463 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1464"><span class="lineNum"> 1464 </span> : : *</a>
|
||
|
<a name="1465"><span class="lineNum"> 1465 </span> : : * Sets value of string to characters in the range [__first,__last).</a>
|
||
|
<a name="1466"><span class="lineNum"> 1466 </span> : : */</a>
|
||
|
<a name="1467"><span class="lineNum"> 1467 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="1468"><span class="lineNum"> 1468 </span> : : template<class _InputIterator,</a>
|
||
|
<a name="1469"><span class="lineNum"> 1469 </span> : : typename = std::_RequireInputIter<_InputIterator>></a>
|
||
|
<a name="1470"><span class="lineNum"> 1470 </span> : : #else</a>
|
||
|
<a name="1471"><span class="lineNum"> 1471 </span> : : template<class _InputIterator></a>
|
||
|
<a name="1472"><span class="lineNum"> 1472 </span> : : #endif</a>
|
||
|
<a name="1473"><span class="lineNum"> 1473 </span> : : basic_string&</a>
|
||
|
<a name="1474"><span class="lineNum"> 1474 </span> : : assign(_InputIterator __first, _InputIterator __last)</a>
|
||
|
<a name="1475"><span class="lineNum"> 1475 </span> : : { return this->replace(begin(), end(), __first, __last); }</a>
|
||
|
<a name="1476"><span class="lineNum"> 1476 </span> : : </a>
|
||
|
<a name="1477"><span class="lineNum"> 1477 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="1478"><span class="lineNum"> 1478 </span> : : /**</a>
|
||
|
<a name="1479"><span class="lineNum"> 1479 </span> : : * @brief Set value to an initializer_list of characters.</a>
|
||
|
<a name="1480"><span class="lineNum"> 1480 </span> : : * @param __l The initializer_list of characters to assign.</a>
|
||
|
<a name="1481"><span class="lineNum"> 1481 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1482"><span class="lineNum"> 1482 </span> : : */</a>
|
||
|
<a name="1483"><span class="lineNum"> 1483 </span> : : basic_string&</a>
|
||
|
<a name="1484"><span class="lineNum"> 1484 </span> : : assign(initializer_list<_CharT> __l)</a>
|
||
|
<a name="1485"><span class="lineNum"> 1485 </span> : : { return this->assign(__l.begin(), __l.size()); }</a>
|
||
|
<a name="1486"><span class="lineNum"> 1486 </span> : : #endif // C++11</a>
|
||
|
<a name="1487"><span class="lineNum"> 1487 </span> : : </a>
|
||
|
<a name="1488"><span class="lineNum"> 1488 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="1489"><span class="lineNum"> 1489 </span> : : /**</a>
|
||
|
<a name="1490"><span class="lineNum"> 1490 </span> : : * @brief Set value from a string_view.</a>
|
||
|
<a name="1491"><span class="lineNum"> 1491 </span> : : * @param __svt The source object convertible to string_view.</a>
|
||
|
<a name="1492"><span class="lineNum"> 1492 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1493"><span class="lineNum"> 1493 </span> : : */</a>
|
||
|
<a name="1494"><span class="lineNum"> 1494 </span> : : template<typename _Tp></a>
|
||
|
<a name="1495"><span class="lineNum"> 1495 </span> : : _If_sv<_Tp, basic_string&></a>
|
||
|
<a name="1496"><span class="lineNum"> 1496 </span> : : assign(const _Tp& __svt)</a>
|
||
|
<a name="1497"><span class="lineNum"> 1497 </span> : : {</a>
|
||
|
<a name="1498"><span class="lineNum"> 1498 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="1499"><span class="lineNum"> 1499 </span> : : return this->assign(__sv.data(), __sv.size());</a>
|
||
|
<a name="1500"><span class="lineNum"> 1500 </span> : : }</a>
|
||
|
<a name="1501"><span class="lineNum"> 1501 </span> : : </a>
|
||
|
<a name="1502"><span class="lineNum"> 1502 </span> : : /**</a>
|
||
|
<a name="1503"><span class="lineNum"> 1503 </span> : : * @brief Set value from a range of characters in a string_view.</a>
|
||
|
<a name="1504"><span class="lineNum"> 1504 </span> : : * @param __svt The source object convertible to string_view.</a>
|
||
|
<a name="1505"><span class="lineNum"> 1505 </span> : : * @param __pos The position in the string_view to assign from.</a>
|
||
|
<a name="1506"><span class="lineNum"> 1506 </span> : : * @param __n The number of characters to assign.</a>
|
||
|
<a name="1507"><span class="lineNum"> 1507 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1508"><span class="lineNum"> 1508 </span> : : */</a>
|
||
|
<a name="1509"><span class="lineNum"> 1509 </span> : : template<typename _Tp></a>
|
||
|
<a name="1510"><span class="lineNum"> 1510 </span> : : _If_sv<_Tp, basic_string&></a>
|
||
|
<a name="1511"><span class="lineNum"> 1511 </span> : : assign(const _Tp& __svt, size_type __pos, size_type __n = npos)</a>
|
||
|
<a name="1512"><span class="lineNum"> 1512 </span> : : {</a>
|
||
|
<a name="1513"><span class="lineNum"> 1513 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="1514"><span class="lineNum"> 1514 </span> : : return _M_replace(size_type(0), this->size(),</a>
|
||
|
<a name="1515"><span class="lineNum"> 1515 </span> : : __sv.data()</a>
|
||
|
<a name="1516"><span class="lineNum"> 1516 </span> : : + std::__sv_check(__sv.size(), __pos, "basic_string::assign"),</a>
|
||
|
<a name="1517"><span class="lineNum"> 1517 </span> : : std::__sv_limit(__sv.size(), __pos, __n));</a>
|
||
|
<a name="1518"><span class="lineNum"> 1518 </span> : : }</a>
|
||
|
<a name="1519"><span class="lineNum"> 1519 </span> : : #endif // C++17</a>
|
||
|
<a name="1520"><span class="lineNum"> 1520 </span> : : </a>
|
||
|
<a name="1521"><span class="lineNum"> 1521 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="1522"><span class="lineNum"> 1522 </span> : : /**</a>
|
||
|
<a name="1523"><span class="lineNum"> 1523 </span> : : * @brief Insert multiple characters.</a>
|
||
|
<a name="1524"><span class="lineNum"> 1524 </span> : : * @param __p Const_iterator referencing location in string to</a>
|
||
|
<a name="1525"><span class="lineNum"> 1525 </span> : : * insert at.</a>
|
||
|
<a name="1526"><span class="lineNum"> 1526 </span> : : * @param __n Number of characters to insert</a>
|
||
|
<a name="1527"><span class="lineNum"> 1527 </span> : : * @param __c The character to insert.</a>
|
||
|
<a name="1528"><span class="lineNum"> 1528 </span> : : * @return Iterator referencing the first inserted char.</a>
|
||
|
<a name="1529"><span class="lineNum"> 1529 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="1530"><span class="lineNum"> 1530 </span> : : *</a>
|
||
|
<a name="1531"><span class="lineNum"> 1531 </span> : : * Inserts @a __n copies of character @a __c starting at the</a>
|
||
|
<a name="1532"><span class="lineNum"> 1532 </span> : : * position referenced by iterator @a __p. If adding</a>
|
||
|
<a name="1533"><span class="lineNum"> 1533 </span> : : * characters causes the length to exceed max_size(),</a>
|
||
|
<a name="1534"><span class="lineNum"> 1534 </span> : : * length_error is thrown. The value of the string doesn't</a>
|
||
|
<a name="1535"><span class="lineNum"> 1535 </span> : : * change if an error is thrown.</a>
|
||
|
<a name="1536"><span class="lineNum"> 1536 </span> : : */</a>
|
||
|
<a name="1537"><span class="lineNum"> 1537 </span> : : iterator</a>
|
||
|
<a name="1538"><span class="lineNum"> 1538 </span> : : insert(const_iterator __p, size_type __n, _CharT __c)</a>
|
||
|
<a name="1539"><span class="lineNum"> 1539 </span> : : {</a>
|
||
|
<a name="1540"><span class="lineNum"> 1540 </span> : : _GLIBCXX_DEBUG_PEDASSERT(__p >= begin() && __p <= end());</a>
|
||
|
<a name="1541"><span class="lineNum"> 1541 </span> : : const size_type __pos = __p - begin();</a>
|
||
|
<a name="1542"><span class="lineNum"> 1542 </span> : : this->replace(__p, __p, __n, __c);</a>
|
||
|
<a name="1543"><span class="lineNum"> 1543 </span> : : return iterator(this->_M_data() + __pos);</a>
|
||
|
<a name="1544"><span class="lineNum"> 1544 </span> : : }</a>
|
||
|
<a name="1545"><span class="lineNum"> 1545 </span> : : #else</a>
|
||
|
<a name="1546"><span class="lineNum"> 1546 </span> : : /**</a>
|
||
|
<a name="1547"><span class="lineNum"> 1547 </span> : : * @brief Insert multiple characters.</a>
|
||
|
<a name="1548"><span class="lineNum"> 1548 </span> : : * @param __p Iterator referencing location in string to insert at.</a>
|
||
|
<a name="1549"><span class="lineNum"> 1549 </span> : : * @param __n Number of characters to insert</a>
|
||
|
<a name="1550"><span class="lineNum"> 1550 </span> : : * @param __c The character to insert.</a>
|
||
|
<a name="1551"><span class="lineNum"> 1551 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="1552"><span class="lineNum"> 1552 </span> : : *</a>
|
||
|
<a name="1553"><span class="lineNum"> 1553 </span> : : * Inserts @a __n copies of character @a __c starting at the</a>
|
||
|
<a name="1554"><span class="lineNum"> 1554 </span> : : * position referenced by iterator @a __p. If adding</a>
|
||
|
<a name="1555"><span class="lineNum"> 1555 </span> : : * characters causes the length to exceed max_size(),</a>
|
||
|
<a name="1556"><span class="lineNum"> 1556 </span> : : * length_error is thrown. The value of the string doesn't</a>
|
||
|
<a name="1557"><span class="lineNum"> 1557 </span> : : * change if an error is thrown.</a>
|
||
|
<a name="1558"><span class="lineNum"> 1558 </span> : : */</a>
|
||
|
<a name="1559"><span class="lineNum"> 1559 </span> : : void</a>
|
||
|
<a name="1560"><span class="lineNum"> 1560 </span> : : insert(iterator __p, size_type __n, _CharT __c)</a>
|
||
|
<a name="1561"><span class="lineNum"> 1561 </span> : : { this->replace(__p, __p, __n, __c); }</a>
|
||
|
<a name="1562"><span class="lineNum"> 1562 </span> : : #endif</a>
|
||
|
<a name="1563"><span class="lineNum"> 1563 </span> : : </a>
|
||
|
<a name="1564"><span class="lineNum"> 1564 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="1565"><span class="lineNum"> 1565 </span> : : /**</a>
|
||
|
<a name="1566"><span class="lineNum"> 1566 </span> : : * @brief Insert a range of characters.</a>
|
||
|
<a name="1567"><span class="lineNum"> 1567 </span> : : * @param __p Const_iterator referencing location in string to</a>
|
||
|
<a name="1568"><span class="lineNum"> 1568 </span> : : * insert at.</a>
|
||
|
<a name="1569"><span class="lineNum"> 1569 </span> : : * @param __beg Start of range.</a>
|
||
|
<a name="1570"><span class="lineNum"> 1570 </span> : : * @param __end End of range.</a>
|
||
|
<a name="1571"><span class="lineNum"> 1571 </span> : : * @return Iterator referencing the first inserted char.</a>
|
||
|
<a name="1572"><span class="lineNum"> 1572 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="1573"><span class="lineNum"> 1573 </span> : : *</a>
|
||
|
<a name="1574"><span class="lineNum"> 1574 </span> : : * Inserts characters in range [beg,end). If adding characters</a>
|
||
|
<a name="1575"><span class="lineNum"> 1575 </span> : : * causes the length to exceed max_size(), length_error is</a>
|
||
|
<a name="1576"><span class="lineNum"> 1576 </span> : : * thrown. The value of the string doesn't change if an error</a>
|
||
|
<a name="1577"><span class="lineNum"> 1577 </span> : : * is thrown.</a>
|
||
|
<a name="1578"><span class="lineNum"> 1578 </span> : : */</a>
|
||
|
<a name="1579"><span class="lineNum"> 1579 </span> : : template<class _InputIterator,</a>
|
||
|
<a name="1580"><span class="lineNum"> 1580 </span> : : typename = std::_RequireInputIter<_InputIterator>></a>
|
||
|
<a name="1581"><span class="lineNum"> 1581 </span> : : iterator</a>
|
||
|
<a name="1582"><span class="lineNum"> 1582 </span> : : insert(const_iterator __p, _InputIterator __beg, _InputIterator __end)</a>
|
||
|
<a name="1583"><span class="lineNum"> 1583 </span> : : {</a>
|
||
|
<a name="1584"><span class="lineNum"> 1584 </span> : : _GLIBCXX_DEBUG_PEDASSERT(__p >= begin() && __p <= end());</a>
|
||
|
<a name="1585"><span class="lineNum"> 1585 </span> : : const size_type __pos = __p - begin();</a>
|
||
|
<a name="1586"><span class="lineNum"> 1586 </span> : : this->replace(__p, __p, __beg, __end);</a>
|
||
|
<a name="1587"><span class="lineNum"> 1587 </span> : : return iterator(this->_M_data() + __pos);</a>
|
||
|
<a name="1588"><span class="lineNum"> 1588 </span> : : }</a>
|
||
|
<a name="1589"><span class="lineNum"> 1589 </span> : : #else</a>
|
||
|
<a name="1590"><span class="lineNum"> 1590 </span> : : /**</a>
|
||
|
<a name="1591"><span class="lineNum"> 1591 </span> : : * @brief Insert a range of characters.</a>
|
||
|
<a name="1592"><span class="lineNum"> 1592 </span> : : * @param __p Iterator referencing location in string to insert at.</a>
|
||
|
<a name="1593"><span class="lineNum"> 1593 </span> : : * @param __beg Start of range.</a>
|
||
|
<a name="1594"><span class="lineNum"> 1594 </span> : : * @param __end End of range.</a>
|
||
|
<a name="1595"><span class="lineNum"> 1595 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="1596"><span class="lineNum"> 1596 </span> : : *</a>
|
||
|
<a name="1597"><span class="lineNum"> 1597 </span> : : * Inserts characters in range [__beg,__end). If adding</a>
|
||
|
<a name="1598"><span class="lineNum"> 1598 </span> : : * characters causes the length to exceed max_size(),</a>
|
||
|
<a name="1599"><span class="lineNum"> 1599 </span> : : * length_error is thrown. The value of the string doesn't</a>
|
||
|
<a name="1600"><span class="lineNum"> 1600 </span> : : * change if an error is thrown.</a>
|
||
|
<a name="1601"><span class="lineNum"> 1601 </span> : : */</a>
|
||
|
<a name="1602"><span class="lineNum"> 1602 </span> : : template<class _InputIterator></a>
|
||
|
<a name="1603"><span class="lineNum"> 1603 </span> : : void</a>
|
||
|
<a name="1604"><span class="lineNum"> 1604 </span> : : insert(iterator __p, _InputIterator __beg, _InputIterator __end)</a>
|
||
|
<a name="1605"><span class="lineNum"> 1605 </span> : : { this->replace(__p, __p, __beg, __end); }</a>
|
||
|
<a name="1606"><span class="lineNum"> 1606 </span> : : #endif</a>
|
||
|
<a name="1607"><span class="lineNum"> 1607 </span> : : </a>
|
||
|
<a name="1608"><span class="lineNum"> 1608 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="1609"><span class="lineNum"> 1609 </span> : : /**</a>
|
||
|
<a name="1610"><span class="lineNum"> 1610 </span> : : * @brief Insert an initializer_list of characters.</a>
|
||
|
<a name="1611"><span class="lineNum"> 1611 </span> : : * @param __p Iterator referencing location in string to insert at.</a>
|
||
|
<a name="1612"><span class="lineNum"> 1612 </span> : : * @param __l The initializer_list of characters to insert.</a>
|
||
|
<a name="1613"><span class="lineNum"> 1613 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="1614"><span class="lineNum"> 1614 </span> : : */</a>
|
||
|
<a name="1615"><span class="lineNum"> 1615 </span> : : iterator</a>
|
||
|
<a name="1616"><span class="lineNum"> 1616 </span> : : insert(const_iterator __p, initializer_list<_CharT> __l)</a>
|
||
|
<a name="1617"><span class="lineNum"> 1617 </span> : : { return this->insert(__p, __l.begin(), __l.end()); }</a>
|
||
|
<a name="1618"><span class="lineNum"> 1618 </span> : : </a>
|
||
|
<a name="1619"><span class="lineNum"> 1619 </span> : : #ifdef _GLIBCXX_DEFINING_STRING_INSTANTIATIONS</a>
|
||
|
<a name="1620"><span class="lineNum"> 1620 </span> : : // See PR libstdc++/83328</a>
|
||
|
<a name="1621"><span class="lineNum"> 1621 </span> : : void</a>
|
||
|
<a name="1622"><span class="lineNum"> 1622 </span> : : insert(iterator __p, initializer_list<_CharT> __l)</a>
|
||
|
<a name="1623"><span class="lineNum"> 1623 </span> : : {</a>
|
||
|
<a name="1624"><span class="lineNum"> 1624 </span> : : _GLIBCXX_DEBUG_PEDASSERT(__p >= begin() && __p <= end());</a>
|
||
|
<a name="1625"><span class="lineNum"> 1625 </span> : : this->insert(__p - begin(), __l.begin(), __l.size());</a>
|
||
|
<a name="1626"><span class="lineNum"> 1626 </span> : : }</a>
|
||
|
<a name="1627"><span class="lineNum"> 1627 </span> : : #endif</a>
|
||
|
<a name="1628"><span class="lineNum"> 1628 </span> : : #endif // C++11</a>
|
||
|
<a name="1629"><span class="lineNum"> 1629 </span> : : </a>
|
||
|
<a name="1630"><span class="lineNum"> 1630 </span> : : /**</a>
|
||
|
<a name="1631"><span class="lineNum"> 1631 </span> : : * @brief Insert value of a string.</a>
|
||
|
<a name="1632"><span class="lineNum"> 1632 </span> : : * @param __pos1 Iterator referencing location in string to insert at.</a>
|
||
|
<a name="1633"><span class="lineNum"> 1633 </span> : : * @param __str The string to insert.</a>
|
||
|
<a name="1634"><span class="lineNum"> 1634 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1635"><span class="lineNum"> 1635 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="1636"><span class="lineNum"> 1636 </span> : : *</a>
|
||
|
<a name="1637"><span class="lineNum"> 1637 </span> : : * Inserts value of @a __str starting at @a __pos1. If adding</a>
|
||
|
<a name="1638"><span class="lineNum"> 1638 </span> : : * characters causes the length to exceed max_size(),</a>
|
||
|
<a name="1639"><span class="lineNum"> 1639 </span> : : * length_error is thrown. The value of the string doesn't</a>
|
||
|
<a name="1640"><span class="lineNum"> 1640 </span> : : * change if an error is thrown.</a>
|
||
|
<a name="1641"><span class="lineNum"> 1641 </span> : : */</a>
|
||
|
<a name="1642"><span class="lineNum"> 1642 </span> : : basic_string&</a>
|
||
|
<a name="1643"><span class="lineNum"> 1643 </span> : : insert(size_type __pos1, const basic_string& __str)</a>
|
||
|
<a name="1644"><span class="lineNum"> 1644 </span> : : { return this->replace(__pos1, size_type(0),</a>
|
||
|
<a name="1645"><span class="lineNum"> 1645 </span> : : __str._M_data(), __str.size()); }</a>
|
||
|
<a name="1646"><span class="lineNum"> 1646 </span> : : </a>
|
||
|
<a name="1647"><span class="lineNum"> 1647 </span> : : /**</a>
|
||
|
<a name="1648"><span class="lineNum"> 1648 </span> : : * @brief Insert a substring.</a>
|
||
|
<a name="1649"><span class="lineNum"> 1649 </span> : : * @param __pos1 Iterator referencing location in string to insert at.</a>
|
||
|
<a name="1650"><span class="lineNum"> 1650 </span> : : * @param __str The string to insert.</a>
|
||
|
<a name="1651"><span class="lineNum"> 1651 </span> : : * @param __pos2 Start of characters in str to insert.</a>
|
||
|
<a name="1652"><span class="lineNum"> 1652 </span> : : * @param __n Number of characters to insert.</a>
|
||
|
<a name="1653"><span class="lineNum"> 1653 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1654"><span class="lineNum"> 1654 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="1655"><span class="lineNum"> 1655 </span> : : * @throw std::out_of_range If @a pos1 > size() or</a>
|
||
|
<a name="1656"><span class="lineNum"> 1656 </span> : : * @a __pos2 > @a str.size().</a>
|
||
|
<a name="1657"><span class="lineNum"> 1657 </span> : : *</a>
|
||
|
<a name="1658"><span class="lineNum"> 1658 </span> : : * Starting at @a pos1, insert @a __n character of @a __str</a>
|
||
|
<a name="1659"><span class="lineNum"> 1659 </span> : : * beginning with @a __pos2. If adding characters causes the</a>
|
||
|
<a name="1660"><span class="lineNum"> 1660 </span> : : * length to exceed max_size(), length_error is thrown. If @a</a>
|
||
|
<a name="1661"><span class="lineNum"> 1661 </span> : : * __pos1 is beyond the end of this string or @a __pos2 is</a>
|
||
|
<a name="1662"><span class="lineNum"> 1662 </span> : : * beyond the end of @a __str, out_of_range is thrown. The</a>
|
||
|
<a name="1663"><span class="lineNum"> 1663 </span> : : * value of the string doesn't change if an error is thrown.</a>
|
||
|
<a name="1664"><span class="lineNum"> 1664 </span> : : */</a>
|
||
|
<a name="1665"><span class="lineNum"> 1665 </span> : : basic_string&</a>
|
||
|
<a name="1666"><span class="lineNum"> 1666 </span> : : insert(size_type __pos1, const basic_string& __str,</a>
|
||
|
<a name="1667"><span class="lineNum"> 1667 </span> : : size_type __pos2, size_type __n = npos)</a>
|
||
|
<a name="1668"><span class="lineNum"> 1668 </span> : : { return this->replace(__pos1, size_type(0), __str._M_data()</a>
|
||
|
<a name="1669"><span class="lineNum"> 1669 </span> : : + __str._M_check(__pos2, "basic_string::insert"),</a>
|
||
|
<a name="1670"><span class="lineNum"> 1670 </span> : : __str._M_limit(__pos2, __n)); }</a>
|
||
|
<a name="1671"><span class="lineNum"> 1671 </span> : : </a>
|
||
|
<a name="1672"><span class="lineNum"> 1672 </span> : : /**</a>
|
||
|
<a name="1673"><span class="lineNum"> 1673 </span> : : * @brief Insert a C substring.</a>
|
||
|
<a name="1674"><span class="lineNum"> 1674 </span> : : * @param __pos Iterator referencing location in string to insert at.</a>
|
||
|
<a name="1675"><span class="lineNum"> 1675 </span> : : * @param __s The C string to insert.</a>
|
||
|
<a name="1676"><span class="lineNum"> 1676 </span> : : * @param __n The number of characters to insert.</a>
|
||
|
<a name="1677"><span class="lineNum"> 1677 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1678"><span class="lineNum"> 1678 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="1679"><span class="lineNum"> 1679 </span> : : * @throw std::out_of_range If @a __pos is beyond the end of this</a>
|
||
|
<a name="1680"><span class="lineNum"> 1680 </span> : : * string.</a>
|
||
|
<a name="1681"><span class="lineNum"> 1681 </span> : : *</a>
|
||
|
<a name="1682"><span class="lineNum"> 1682 </span> : : * Inserts the first @a __n characters of @a __s starting at @a</a>
|
||
|
<a name="1683"><span class="lineNum"> 1683 </span> : : * __pos. If adding characters causes the length to exceed</a>
|
||
|
<a name="1684"><span class="lineNum"> 1684 </span> : : * max_size(), length_error is thrown. If @a __pos is beyond</a>
|
||
|
<a name="1685"><span class="lineNum"> 1685 </span> : : * end(), out_of_range is thrown. The value of the string</a>
|
||
|
<a name="1686"><span class="lineNum"> 1686 </span> : : * doesn't change if an error is thrown.</a>
|
||
|
<a name="1687"><span class="lineNum"> 1687 </span> : : */</a>
|
||
|
<a name="1688"><span class="lineNum"> 1688 </span> : : basic_string&</a>
|
||
|
<a name="1689"><span class="lineNum"> 1689 </span> : : insert(size_type __pos, const _CharT* __s, size_type __n)</a>
|
||
|
<a name="1690"><span class="lineNum"> 1690 </span> : : { return this->replace(__pos, size_type(0), __s, __n); }</a>
|
||
|
<a name="1691"><span class="lineNum"> 1691 </span> : : </a>
|
||
|
<a name="1692"><span class="lineNum"> 1692 </span> : : /**</a>
|
||
|
<a name="1693"><span class="lineNum"> 1693 </span> : : * @brief Insert a C string.</a>
|
||
|
<a name="1694"><span class="lineNum"> 1694 </span> : : * @param __pos Iterator referencing location in string to insert at.</a>
|
||
|
<a name="1695"><span class="lineNum"> 1695 </span> : : * @param __s The C string to insert.</a>
|
||
|
<a name="1696"><span class="lineNum"> 1696 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1697"><span class="lineNum"> 1697 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="1698"><span class="lineNum"> 1698 </span> : : * @throw std::out_of_range If @a pos is beyond the end of this</a>
|
||
|
<a name="1699"><span class="lineNum"> 1699 </span> : : * string.</a>
|
||
|
<a name="1700"><span class="lineNum"> 1700 </span> : : *</a>
|
||
|
<a name="1701"><span class="lineNum"> 1701 </span> : : * Inserts the first @a n characters of @a __s starting at @a __pos. If</a>
|
||
|
<a name="1702"><span class="lineNum"> 1702 </span> : : * adding characters causes the length to exceed max_size(),</a>
|
||
|
<a name="1703"><span class="lineNum"> 1703 </span> : : * length_error is thrown. If @a __pos is beyond end(), out_of_range is</a>
|
||
|
<a name="1704"><span class="lineNum"> 1704 </span> : : * thrown. The value of the string doesn't change if an error is</a>
|
||
|
<a name="1705"><span class="lineNum"> 1705 </span> : : * thrown.</a>
|
||
|
<a name="1706"><span class="lineNum"> 1706 </span> : : */</a>
|
||
|
<a name="1707"><span class="lineNum"> 1707 </span> : : basic_string&</a>
|
||
|
<a name="1708"><span class="lineNum"> 1708 </span> : : insert(size_type __pos, const _CharT* __s)</a>
|
||
|
<a name="1709"><span class="lineNum"> 1709 </span> : : {</a>
|
||
|
<a name="1710"><span class="lineNum"> 1710 </span> : : __glibcxx_requires_string(__s);</a>
|
||
|
<a name="1711"><span class="lineNum"> 1711 </span> : : return this->replace(__pos, size_type(0), __s,</a>
|
||
|
<a name="1712"><span class="lineNum"> 1712 </span> : : traits_type::length(__s));</a>
|
||
|
<a name="1713"><span class="lineNum"> 1713 </span> : : }</a>
|
||
|
<a name="1714"><span class="lineNum"> 1714 </span> : : </a>
|
||
|
<a name="1715"><span class="lineNum"> 1715 </span> : : /**</a>
|
||
|
<a name="1716"><span class="lineNum"> 1716 </span> : : * @brief Insert multiple characters.</a>
|
||
|
<a name="1717"><span class="lineNum"> 1717 </span> : : * @param __pos Index in string to insert at.</a>
|
||
|
<a name="1718"><span class="lineNum"> 1718 </span> : : * @param __n Number of characters to insert</a>
|
||
|
<a name="1719"><span class="lineNum"> 1719 </span> : : * @param __c The character to insert.</a>
|
||
|
<a name="1720"><span class="lineNum"> 1720 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1721"><span class="lineNum"> 1721 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="1722"><span class="lineNum"> 1722 </span> : : * @throw std::out_of_range If @a __pos is beyond the end of this</a>
|
||
|
<a name="1723"><span class="lineNum"> 1723 </span> : : * string.</a>
|
||
|
<a name="1724"><span class="lineNum"> 1724 </span> : : *</a>
|
||
|
<a name="1725"><span class="lineNum"> 1725 </span> : : * Inserts @a __n copies of character @a __c starting at index</a>
|
||
|
<a name="1726"><span class="lineNum"> 1726 </span> : : * @a __pos. If adding characters causes the length to exceed</a>
|
||
|
<a name="1727"><span class="lineNum"> 1727 </span> : : * max_size(), length_error is thrown. If @a __pos > length(),</a>
|
||
|
<a name="1728"><span class="lineNum"> 1728 </span> : : * out_of_range is thrown. The value of the string doesn't</a>
|
||
|
<a name="1729"><span class="lineNum"> 1729 </span> : : * change if an error is thrown.</a>
|
||
|
<a name="1730"><span class="lineNum"> 1730 </span> : : */</a>
|
||
|
<a name="1731"><span class="lineNum"> 1731 </span> : : basic_string&</a>
|
||
|
<a name="1732"><span class="lineNum"> 1732 </span> : : insert(size_type __pos, size_type __n, _CharT __c)</a>
|
||
|
<a name="1733"><span class="lineNum"> 1733 </span> : : { return _M_replace_aux(_M_check(__pos, "basic_string::insert"),</a>
|
||
|
<a name="1734"><span class="lineNum"> 1734 </span> : : size_type(0), __n, __c); }</a>
|
||
|
<a name="1735"><span class="lineNum"> 1735 </span> : : </a>
|
||
|
<a name="1736"><span class="lineNum"> 1736 </span> : : /**</a>
|
||
|
<a name="1737"><span class="lineNum"> 1737 </span> : : * @brief Insert one character.</a>
|
||
|
<a name="1738"><span class="lineNum"> 1738 </span> : : * @param __p Iterator referencing position in string to insert at.</a>
|
||
|
<a name="1739"><span class="lineNum"> 1739 </span> : : * @param __c The character to insert.</a>
|
||
|
<a name="1740"><span class="lineNum"> 1740 </span> : : * @return Iterator referencing newly inserted char.</a>
|
||
|
<a name="1741"><span class="lineNum"> 1741 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="1742"><span class="lineNum"> 1742 </span> : : *</a>
|
||
|
<a name="1743"><span class="lineNum"> 1743 </span> : : * Inserts character @a __c at position referenced by @a __p.</a>
|
||
|
<a name="1744"><span class="lineNum"> 1744 </span> : : * If adding character causes the length to exceed max_size(),</a>
|
||
|
<a name="1745"><span class="lineNum"> 1745 </span> : : * length_error is thrown. If @a __p is beyond end of string,</a>
|
||
|
<a name="1746"><span class="lineNum"> 1746 </span> : : * out_of_range is thrown. The value of the string doesn't</a>
|
||
|
<a name="1747"><span class="lineNum"> 1747 </span> : : * change if an error is thrown.</a>
|
||
|
<a name="1748"><span class="lineNum"> 1748 </span> : : */</a>
|
||
|
<a name="1749"><span class="lineNum"> 1749 </span> : : iterator</a>
|
||
|
<a name="1750"><span class="lineNum"> 1750 </span> : : insert(__const_iterator __p, _CharT __c)</a>
|
||
|
<a name="1751"><span class="lineNum"> 1751 </span> : : {</a>
|
||
|
<a name="1752"><span class="lineNum"> 1752 </span> : : _GLIBCXX_DEBUG_PEDASSERT(__p >= begin() && __p <= end());</a>
|
||
|
<a name="1753"><span class="lineNum"> 1753 </span> : : const size_type __pos = __p - begin();</a>
|
||
|
<a name="1754"><span class="lineNum"> 1754 </span> : : _M_replace_aux(__pos, size_type(0), size_type(1), __c);</a>
|
||
|
<a name="1755"><span class="lineNum"> 1755 </span> : : return iterator(_M_data() + __pos);</a>
|
||
|
<a name="1756"><span class="lineNum"> 1756 </span> : : }</a>
|
||
|
<a name="1757"><span class="lineNum"> 1757 </span> : : </a>
|
||
|
<a name="1758"><span class="lineNum"> 1758 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="1759"><span class="lineNum"> 1759 </span> : : /**</a>
|
||
|
<a name="1760"><span class="lineNum"> 1760 </span> : : * @brief Insert a string_view.</a>
|
||
|
<a name="1761"><span class="lineNum"> 1761 </span> : : * @param __pos Iterator referencing position in string to insert at.</a>
|
||
|
<a name="1762"><span class="lineNum"> 1762 </span> : : * @param __svt The object convertible to string_view to insert.</a>
|
||
|
<a name="1763"><span class="lineNum"> 1763 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1764"><span class="lineNum"> 1764 </span> : : */</a>
|
||
|
<a name="1765"><span class="lineNum"> 1765 </span> : : template<typename _Tp></a>
|
||
|
<a name="1766"><span class="lineNum"> 1766 </span> : : _If_sv<_Tp, basic_string&></a>
|
||
|
<a name="1767"><span class="lineNum"> 1767 </span> : : insert(size_type __pos, const _Tp& __svt)</a>
|
||
|
<a name="1768"><span class="lineNum"> 1768 </span> : : {</a>
|
||
|
<a name="1769"><span class="lineNum"> 1769 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="1770"><span class="lineNum"> 1770 </span> : : return this->insert(__pos, __sv.data(), __sv.size());</a>
|
||
|
<a name="1771"><span class="lineNum"> 1771 </span> : : }</a>
|
||
|
<a name="1772"><span class="lineNum"> 1772 </span> : : </a>
|
||
|
<a name="1773"><span class="lineNum"> 1773 </span> : : /**</a>
|
||
|
<a name="1774"><span class="lineNum"> 1774 </span> : : * @brief Insert a string_view.</a>
|
||
|
<a name="1775"><span class="lineNum"> 1775 </span> : : * @param __pos Iterator referencing position in string to insert at.</a>
|
||
|
<a name="1776"><span class="lineNum"> 1776 </span> : : * @param __svt The object convertible to string_view to insert from.</a>
|
||
|
<a name="1777"><span class="lineNum"> 1777 </span> : : * @param __pos Iterator referencing position in string_view to insert</a>
|
||
|
<a name="1778"><span class="lineNum"> 1778 </span> : : * from.</a>
|
||
|
<a name="1779"><span class="lineNum"> 1779 </span> : : * @param __n The number of characters to insert.</a>
|
||
|
<a name="1780"><span class="lineNum"> 1780 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1781"><span class="lineNum"> 1781 </span> : : */</a>
|
||
|
<a name="1782"><span class="lineNum"> 1782 </span> : : template<typename _Tp></a>
|
||
|
<a name="1783"><span class="lineNum"> 1783 </span> : : _If_sv<_Tp, basic_string&></a>
|
||
|
<a name="1784"><span class="lineNum"> 1784 </span> : : insert(size_type __pos1, const _Tp& __svt,</a>
|
||
|
<a name="1785"><span class="lineNum"> 1785 </span> : : size_type __pos2, size_type __n = npos)</a>
|
||
|
<a name="1786"><span class="lineNum"> 1786 </span> : : {</a>
|
||
|
<a name="1787"><span class="lineNum"> 1787 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="1788"><span class="lineNum"> 1788 </span> : : return this->replace(__pos1, size_type(0),</a>
|
||
|
<a name="1789"><span class="lineNum"> 1789 </span> : : __sv.data()</a>
|
||
|
<a name="1790"><span class="lineNum"> 1790 </span> : : + std::__sv_check(__sv.size(), __pos2, "basic_string::insert"),</a>
|
||
|
<a name="1791"><span class="lineNum"> 1791 </span> : : std::__sv_limit(__sv.size(), __pos2, __n));</a>
|
||
|
<a name="1792"><span class="lineNum"> 1792 </span> : : }</a>
|
||
|
<a name="1793"><span class="lineNum"> 1793 </span> : : #endif // C++17</a>
|
||
|
<a name="1794"><span class="lineNum"> 1794 </span> : : </a>
|
||
|
<a name="1795"><span class="lineNum"> 1795 </span> : : /**</a>
|
||
|
<a name="1796"><span class="lineNum"> 1796 </span> : : * @brief Remove characters.</a>
|
||
|
<a name="1797"><span class="lineNum"> 1797 </span> : : * @param __pos Index of first character to remove (default 0).</a>
|
||
|
<a name="1798"><span class="lineNum"> 1798 </span> : : * @param __n Number of characters to remove (default remainder).</a>
|
||
|
<a name="1799"><span class="lineNum"> 1799 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1800"><span class="lineNum"> 1800 </span> : : * @throw std::out_of_range If @a pos is beyond the end of this</a>
|
||
|
<a name="1801"><span class="lineNum"> 1801 </span> : : * string.</a>
|
||
|
<a name="1802"><span class="lineNum"> 1802 </span> : : *</a>
|
||
|
<a name="1803"><span class="lineNum"> 1803 </span> : : * Removes @a __n characters from this string starting at @a</a>
|
||
|
<a name="1804"><span class="lineNum"> 1804 </span> : : * __pos. The length of the string is reduced by @a __n. If</a>
|
||
|
<a name="1805"><span class="lineNum"> 1805 </span> : : * there are < @a __n characters to remove, the remainder of</a>
|
||
|
<a name="1806"><span class="lineNum"> 1806 </span> : : * the string is truncated. If @a __p is beyond end of string,</a>
|
||
|
<a name="1807"><span class="lineNum"> 1807 </span> : : * out_of_range is thrown. The value of the string doesn't</a>
|
||
|
<a name="1808"><span class="lineNum"> 1808 </span> : : * change if an error is thrown.</a>
|
||
|
<a name="1809"><span class="lineNum"> 1809 </span> : : */</a>
|
||
|
<a name="1810"><span class="lineNum"> 1810 </span> : : basic_string&</a>
|
||
|
<a name="1811"><span class="lineNum"> 1811 </span> : : erase(size_type __pos = 0, size_type __n = npos)</a>
|
||
|
<a name="1812"><span class="lineNum"> 1812 </span> : : {</a>
|
||
|
<a name="1813"><span class="lineNum"> 1813 </span> : : _M_check(__pos, "basic_string::erase");</a>
|
||
|
<a name="1814"><span class="lineNum"> 1814 </span> : : if (__n == npos)</a>
|
||
|
<a name="1815"><span class="lineNum"> 1815 </span> : : this->_M_set_length(__pos);</a>
|
||
|
<a name="1816"><span class="lineNum"> 1816 </span> : : else if (__n != 0)</a>
|
||
|
<a name="1817"><span class="lineNum"> 1817 </span> : : this->_M_erase(__pos, _M_limit(__pos, __n));</a>
|
||
|
<a name="1818"><span class="lineNum"> 1818 </span> : : return *this;</a>
|
||
|
<a name="1819"><span class="lineNum"> 1819 </span> : : }</a>
|
||
|
<a name="1820"><span class="lineNum"> 1820 </span> : : </a>
|
||
|
<a name="1821"><span class="lineNum"> 1821 </span> : : /**</a>
|
||
|
<a name="1822"><span class="lineNum"> 1822 </span> : : * @brief Remove one character.</a>
|
||
|
<a name="1823"><span class="lineNum"> 1823 </span> : : * @param __position Iterator referencing the character to remove.</a>
|
||
|
<a name="1824"><span class="lineNum"> 1824 </span> : : * @return iterator referencing same location after removal.</a>
|
||
|
<a name="1825"><span class="lineNum"> 1825 </span> : : *</a>
|
||
|
<a name="1826"><span class="lineNum"> 1826 </span> : : * Removes the character at @a __position from this string. The value</a>
|
||
|
<a name="1827"><span class="lineNum"> 1827 </span> : : * of the string doesn't change if an error is thrown.</a>
|
||
|
<a name="1828"><span class="lineNum"> 1828 </span> : : */</a>
|
||
|
<a name="1829"><span class="lineNum"> 1829 </span> : : iterator</a>
|
||
|
<a name="1830"><span class="lineNum"> 1830 </span> : : erase(__const_iterator __position)</a>
|
||
|
<a name="1831"><span class="lineNum"> 1831 </span> : : {</a>
|
||
|
<a name="1832"><span class="lineNum"> 1832 </span> : : _GLIBCXX_DEBUG_PEDASSERT(__position >= begin()</a>
|
||
|
<a name="1833"><span class="lineNum"> 1833 </span> : : && __position < end());</a>
|
||
|
<a name="1834"><span class="lineNum"> 1834 </span> : : const size_type __pos = __position - begin();</a>
|
||
|
<a name="1835"><span class="lineNum"> 1835 </span> : : this->_M_erase(__pos, size_type(1));</a>
|
||
|
<a name="1836"><span class="lineNum"> 1836 </span> : : return iterator(_M_data() + __pos);</a>
|
||
|
<a name="1837"><span class="lineNum"> 1837 </span> : : }</a>
|
||
|
<a name="1838"><span class="lineNum"> 1838 </span> : : </a>
|
||
|
<a name="1839"><span class="lineNum"> 1839 </span> : : /**</a>
|
||
|
<a name="1840"><span class="lineNum"> 1840 </span> : : * @brief Remove a range of characters.</a>
|
||
|
<a name="1841"><span class="lineNum"> 1841 </span> : : * @param __first Iterator referencing the first character to remove.</a>
|
||
|
<a name="1842"><span class="lineNum"> 1842 </span> : : * @param __last Iterator referencing the end of the range.</a>
|
||
|
<a name="1843"><span class="lineNum"> 1843 </span> : : * @return Iterator referencing location of first after removal.</a>
|
||
|
<a name="1844"><span class="lineNum"> 1844 </span> : : *</a>
|
||
|
<a name="1845"><span class="lineNum"> 1845 </span> : : * Removes the characters in the range [first,last) from this string.</a>
|
||
|
<a name="1846"><span class="lineNum"> 1846 </span> : : * The value of the string doesn't change if an error is thrown.</a>
|
||
|
<a name="1847"><span class="lineNum"> 1847 </span> : : */</a>
|
||
|
<a name="1848"><span class="lineNum"> 1848 </span> : : iterator</a>
|
||
|
<a name="1849"><span class="lineNum"> 1849 </span> : : erase(__const_iterator __first, __const_iterator __last)</a>
|
||
|
<a name="1850"><span class="lineNum"> 1850 </span> : : {</a>
|
||
|
<a name="1851"><span class="lineNum"> 1851 </span> : : _GLIBCXX_DEBUG_PEDASSERT(__first >= begin() && __first <= __last</a>
|
||
|
<a name="1852"><span class="lineNum"> 1852 </span> : : && __last <= end());</a>
|
||
|
<a name="1853"><span class="lineNum"> 1853 </span> : : const size_type __pos = __first - begin();</a>
|
||
|
<a name="1854"><span class="lineNum"> 1854 </span> : : if (__last == end())</a>
|
||
|
<a name="1855"><span class="lineNum"> 1855 </span> : : this->_M_set_length(__pos);</a>
|
||
|
<a name="1856"><span class="lineNum"> 1856 </span> : : else</a>
|
||
|
<a name="1857"><span class="lineNum"> 1857 </span> : : this->_M_erase(__pos, __last - __first);</a>
|
||
|
<a name="1858"><span class="lineNum"> 1858 </span> : : return iterator(this->_M_data() + __pos);</a>
|
||
|
<a name="1859"><span class="lineNum"> 1859 </span> : : }</a>
|
||
|
<a name="1860"><span class="lineNum"> 1860 </span> : : </a>
|
||
|
<a name="1861"><span class="lineNum"> 1861 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="1862"><span class="lineNum"> 1862 </span> : : /**</a>
|
||
|
<a name="1863"><span class="lineNum"> 1863 </span> : : * @brief Remove the last character.</a>
|
||
|
<a name="1864"><span class="lineNum"> 1864 </span> : : *</a>
|
||
|
<a name="1865"><span class="lineNum"> 1865 </span> : : * The string must be non-empty.</a>
|
||
|
<a name="1866"><span class="lineNum"> 1866 </span> : : */</a>
|
||
|
<a name="1867"><span class="lineNum"> 1867 </span> : : void</a>
|
||
|
<a name="1868"><span class="lineNum"> 1868 </span> : : pop_back() noexcept</a>
|
||
|
<a name="1869"><span class="lineNum"> 1869 </span> : : {</a>
|
||
|
<a name="1870"><span class="lineNum"> 1870 </span> : : __glibcxx_assert(!empty());</a>
|
||
|
<a name="1871"><span class="lineNum"> 1871 </span> : : _M_erase(size() - 1, 1);</a>
|
||
|
<a name="1872"><span class="lineNum"> 1872 </span> : : }</a>
|
||
|
<a name="1873"><span class="lineNum"> 1873 </span> : : #endif // C++11</a>
|
||
|
<a name="1874"><span class="lineNum"> 1874 </span> : : </a>
|
||
|
<a name="1875"><span class="lineNum"> 1875 </span> : : /**</a>
|
||
|
<a name="1876"><span class="lineNum"> 1876 </span> : : * @brief Replace characters with value from another string.</a>
|
||
|
<a name="1877"><span class="lineNum"> 1877 </span> : : * @param __pos Index of first character to replace.</a>
|
||
|
<a name="1878"><span class="lineNum"> 1878 </span> : : * @param __n Number of characters to be replaced.</a>
|
||
|
<a name="1879"><span class="lineNum"> 1879 </span> : : * @param __str String to insert.</a>
|
||
|
<a name="1880"><span class="lineNum"> 1880 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1881"><span class="lineNum"> 1881 </span> : : * @throw std::out_of_range If @a pos is beyond the end of this</a>
|
||
|
<a name="1882"><span class="lineNum"> 1882 </span> : : * string.</a>
|
||
|
<a name="1883"><span class="lineNum"> 1883 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="1884"><span class="lineNum"> 1884 </span> : : *</a>
|
||
|
<a name="1885"><span class="lineNum"> 1885 </span> : : * Removes the characters in the range [__pos,__pos+__n) from</a>
|
||
|
<a name="1886"><span class="lineNum"> 1886 </span> : : * this string. In place, the value of @a __str is inserted.</a>
|
||
|
<a name="1887"><span class="lineNum"> 1887 </span> : : * If @a __pos is beyond end of string, out_of_range is thrown.</a>
|
||
|
<a name="1888"><span class="lineNum"> 1888 </span> : : * If the length of the result exceeds max_size(), length_error</a>
|
||
|
<a name="1889"><span class="lineNum"> 1889 </span> : : * is thrown. The value of the string doesn't change if an</a>
|
||
|
<a name="1890"><span class="lineNum"> 1890 </span> : : * error is thrown.</a>
|
||
|
<a name="1891"><span class="lineNum"> 1891 </span> : : */</a>
|
||
|
<a name="1892"><span class="lineNum"> 1892 </span> : : basic_string&</a>
|
||
|
<a name="1893"><span class="lineNum"> 1893 </span> : : replace(size_type __pos, size_type __n, const basic_string& __str)</a>
|
||
|
<a name="1894"><span class="lineNum"> 1894 </span> : : { return this->replace(__pos, __n, __str._M_data(), __str.size()); }</a>
|
||
|
<a name="1895"><span class="lineNum"> 1895 </span> : : </a>
|
||
|
<a name="1896"><span class="lineNum"> 1896 </span> : : /**</a>
|
||
|
<a name="1897"><span class="lineNum"> 1897 </span> : : * @brief Replace characters with value from another string.</a>
|
||
|
<a name="1898"><span class="lineNum"> 1898 </span> : : * @param __pos1 Index of first character to replace.</a>
|
||
|
<a name="1899"><span class="lineNum"> 1899 </span> : : * @param __n1 Number of characters to be replaced.</a>
|
||
|
<a name="1900"><span class="lineNum"> 1900 </span> : : * @param __str String to insert.</a>
|
||
|
<a name="1901"><span class="lineNum"> 1901 </span> : : * @param __pos2 Index of first character of str to use.</a>
|
||
|
<a name="1902"><span class="lineNum"> 1902 </span> : : * @param __n2 Number of characters from str to use.</a>
|
||
|
<a name="1903"><span class="lineNum"> 1903 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1904"><span class="lineNum"> 1904 </span> : : * @throw std::out_of_range If @a __pos1 > size() or @a __pos2 ></a>
|
||
|
<a name="1905"><span class="lineNum"> 1905 </span> : : * __str.size().</a>
|
||
|
<a name="1906"><span class="lineNum"> 1906 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="1907"><span class="lineNum"> 1907 </span> : : *</a>
|
||
|
<a name="1908"><span class="lineNum"> 1908 </span> : : * Removes the characters in the range [__pos1,__pos1 + n) from this</a>
|
||
|
<a name="1909"><span class="lineNum"> 1909 </span> : : * string. In place, the value of @a __str is inserted. If @a __pos is</a>
|
||
|
<a name="1910"><span class="lineNum"> 1910 </span> : : * beyond end of string, out_of_range is thrown. If the length of the</a>
|
||
|
<a name="1911"><span class="lineNum"> 1911 </span> : : * result exceeds max_size(), length_error is thrown. The value of the</a>
|
||
|
<a name="1912"><span class="lineNum"> 1912 </span> : : * string doesn't change if an error is thrown.</a>
|
||
|
<a name="1913"><span class="lineNum"> 1913 </span> : : */</a>
|
||
|
<a name="1914"><span class="lineNum"> 1914 </span> : : basic_string&</a>
|
||
|
<a name="1915"><span class="lineNum"> 1915 </span> : : replace(size_type __pos1, size_type __n1, const basic_string& __str,</a>
|
||
|
<a name="1916"><span class="lineNum"> 1916 </span> : : size_type __pos2, size_type __n2 = npos)</a>
|
||
|
<a name="1917"><span class="lineNum"> 1917 </span> : : { return this->replace(__pos1, __n1, __str._M_data()</a>
|
||
|
<a name="1918"><span class="lineNum"> 1918 </span> : : + __str._M_check(__pos2, "basic_string::replace"),</a>
|
||
|
<a name="1919"><span class="lineNum"> 1919 </span> : : __str._M_limit(__pos2, __n2)); }</a>
|
||
|
<a name="1920"><span class="lineNum"> 1920 </span> : : </a>
|
||
|
<a name="1921"><span class="lineNum"> 1921 </span> : : /**</a>
|
||
|
<a name="1922"><span class="lineNum"> 1922 </span> : : * @brief Replace characters with value of a C substring.</a>
|
||
|
<a name="1923"><span class="lineNum"> 1923 </span> : : * @param __pos Index of first character to replace.</a>
|
||
|
<a name="1924"><span class="lineNum"> 1924 </span> : : * @param __n1 Number of characters to be replaced.</a>
|
||
|
<a name="1925"><span class="lineNum"> 1925 </span> : : * @param __s C string to insert.</a>
|
||
|
<a name="1926"><span class="lineNum"> 1926 </span> : : * @param __n2 Number of characters from @a s to use.</a>
|
||
|
<a name="1927"><span class="lineNum"> 1927 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1928"><span class="lineNum"> 1928 </span> : : * @throw std::out_of_range If @a pos1 > size().</a>
|
||
|
<a name="1929"><span class="lineNum"> 1929 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="1930"><span class="lineNum"> 1930 </span> : : *</a>
|
||
|
<a name="1931"><span class="lineNum"> 1931 </span> : : * Removes the characters in the range [__pos,__pos + __n1)</a>
|
||
|
<a name="1932"><span class="lineNum"> 1932 </span> : : * from this string. In place, the first @a __n2 characters of</a>
|
||
|
<a name="1933"><span class="lineNum"> 1933 </span> : : * @a __s are inserted, or all of @a __s if @a __n2 is too large. If</a>
|
||
|
<a name="1934"><span class="lineNum"> 1934 </span> : : * @a __pos is beyond end of string, out_of_range is thrown. If</a>
|
||
|
<a name="1935"><span class="lineNum"> 1935 </span> : : * the length of result exceeds max_size(), length_error is</a>
|
||
|
<a name="1936"><span class="lineNum"> 1936 </span> : : * thrown. The value of the string doesn't change if an error</a>
|
||
|
<a name="1937"><span class="lineNum"> 1937 </span> : : * is thrown.</a>
|
||
|
<a name="1938"><span class="lineNum"> 1938 </span> : : */</a>
|
||
|
<a name="1939"><span class="lineNum"> 1939 </span> : : basic_string&</a>
|
||
|
<a name="1940"><span class="lineNum"> 1940 </span> : : replace(size_type __pos, size_type __n1, const _CharT* __s,</a>
|
||
|
<a name="1941"><span class="lineNum"> 1941 </span> : : size_type __n2)</a>
|
||
|
<a name="1942"><span class="lineNum"> 1942 </span> : : {</a>
|
||
|
<a name="1943"><span class="lineNum"> 1943 </span> : : __glibcxx_requires_string_len(__s, __n2);</a>
|
||
|
<a name="1944"><span class="lineNum"> 1944 </span> : : return _M_replace(_M_check(__pos, "basic_string::replace"),</a>
|
||
|
<a name="1945"><span class="lineNum"> 1945 </span> : : _M_limit(__pos, __n1), __s, __n2);</a>
|
||
|
<a name="1946"><span class="lineNum"> 1946 </span> : : }</a>
|
||
|
<a name="1947"><span class="lineNum"> 1947 </span> : : </a>
|
||
|
<a name="1948"><span class="lineNum"> 1948 </span> : : /**</a>
|
||
|
<a name="1949"><span class="lineNum"> 1949 </span> : : * @brief Replace characters with value of a C string.</a>
|
||
|
<a name="1950"><span class="lineNum"> 1950 </span> : : * @param __pos Index of first character to replace.</a>
|
||
|
<a name="1951"><span class="lineNum"> 1951 </span> : : * @param __n1 Number of characters to be replaced.</a>
|
||
|
<a name="1952"><span class="lineNum"> 1952 </span> : : * @param __s C string to insert.</a>
|
||
|
<a name="1953"><span class="lineNum"> 1953 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1954"><span class="lineNum"> 1954 </span> : : * @throw std::out_of_range If @a pos > size().</a>
|
||
|
<a name="1955"><span class="lineNum"> 1955 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="1956"><span class="lineNum"> 1956 </span> : : *</a>
|
||
|
<a name="1957"><span class="lineNum"> 1957 </span> : : * Removes the characters in the range [__pos,__pos + __n1)</a>
|
||
|
<a name="1958"><span class="lineNum"> 1958 </span> : : * from this string. In place, the characters of @a __s are</a>
|
||
|
<a name="1959"><span class="lineNum"> 1959 </span> : : * inserted. If @a __pos is beyond end of string, out_of_range</a>
|
||
|
<a name="1960"><span class="lineNum"> 1960 </span> : : * is thrown. If the length of result exceeds max_size(),</a>
|
||
|
<a name="1961"><span class="lineNum"> 1961 </span> : : * length_error is thrown. The value of the string doesn't</a>
|
||
|
<a name="1962"><span class="lineNum"> 1962 </span> : : * change if an error is thrown.</a>
|
||
|
<a name="1963"><span class="lineNum"> 1963 </span> : : */</a>
|
||
|
<a name="1964"><span class="lineNum"> 1964 </span> : : basic_string&</a>
|
||
|
<a name="1965"><span class="lineNum"> 1965 </span> : : replace(size_type __pos, size_type __n1, const _CharT* __s)</a>
|
||
|
<a name="1966"><span class="lineNum"> 1966 </span> : : {</a>
|
||
|
<a name="1967"><span class="lineNum"> 1967 </span> : : __glibcxx_requires_string(__s);</a>
|
||
|
<a name="1968"><span class="lineNum"> 1968 </span> : : return this->replace(__pos, __n1, __s, traits_type::length(__s));</a>
|
||
|
<a name="1969"><span class="lineNum"> 1969 </span> : : }</a>
|
||
|
<a name="1970"><span class="lineNum"> 1970 </span> : : </a>
|
||
|
<a name="1971"><span class="lineNum"> 1971 </span> : : /**</a>
|
||
|
<a name="1972"><span class="lineNum"> 1972 </span> : : * @brief Replace characters with multiple characters.</a>
|
||
|
<a name="1973"><span class="lineNum"> 1973 </span> : : * @param __pos Index of first character to replace.</a>
|
||
|
<a name="1974"><span class="lineNum"> 1974 </span> : : * @param __n1 Number of characters to be replaced.</a>
|
||
|
<a name="1975"><span class="lineNum"> 1975 </span> : : * @param __n2 Number of characters to insert.</a>
|
||
|
<a name="1976"><span class="lineNum"> 1976 </span> : : * @param __c Character to insert.</a>
|
||
|
<a name="1977"><span class="lineNum"> 1977 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1978"><span class="lineNum"> 1978 </span> : : * @throw std::out_of_range If @a __pos > size().</a>
|
||
|
<a name="1979"><span class="lineNum"> 1979 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="1980"><span class="lineNum"> 1980 </span> : : *</a>
|
||
|
<a name="1981"><span class="lineNum"> 1981 </span> : : * Removes the characters in the range [pos,pos + n1) from this</a>
|
||
|
<a name="1982"><span class="lineNum"> 1982 </span> : : * string. In place, @a __n2 copies of @a __c are inserted.</a>
|
||
|
<a name="1983"><span class="lineNum"> 1983 </span> : : * If @a __pos is beyond end of string, out_of_range is thrown.</a>
|
||
|
<a name="1984"><span class="lineNum"> 1984 </span> : : * If the length of result exceeds max_size(), length_error is</a>
|
||
|
<a name="1985"><span class="lineNum"> 1985 </span> : : * thrown. The value of the string doesn't change if an error</a>
|
||
|
<a name="1986"><span class="lineNum"> 1986 </span> : : * is thrown.</a>
|
||
|
<a name="1987"><span class="lineNum"> 1987 </span> : : */</a>
|
||
|
<a name="1988"><span class="lineNum"> 1988 </span> : : basic_string&</a>
|
||
|
<a name="1989"><span class="lineNum"> 1989 </span> : : replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)</a>
|
||
|
<a name="1990"><span class="lineNum"> 1990 </span> : : { return _M_replace_aux(_M_check(__pos, "basic_string::replace"),</a>
|
||
|
<a name="1991"><span class="lineNum"> 1991 </span> : : _M_limit(__pos, __n1), __n2, __c); }</a>
|
||
|
<a name="1992"><span class="lineNum"> 1992 </span> : : </a>
|
||
|
<a name="1993"><span class="lineNum"> 1993 </span> : : /**</a>
|
||
|
<a name="1994"><span class="lineNum"> 1994 </span> : : * @brief Replace range of characters with string.</a>
|
||
|
<a name="1995"><span class="lineNum"> 1995 </span> : : * @param __i1 Iterator referencing start of range to replace.</a>
|
||
|
<a name="1996"><span class="lineNum"> 1996 </span> : : * @param __i2 Iterator referencing end of range to replace.</a>
|
||
|
<a name="1997"><span class="lineNum"> 1997 </span> : : * @param __str String value to insert.</a>
|
||
|
<a name="1998"><span class="lineNum"> 1998 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="1999"><span class="lineNum"> 1999 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="2000"><span class="lineNum"> 2000 </span> : : *</a>
|
||
|
<a name="2001"><span class="lineNum"> 2001 </span> : : * Removes the characters in the range [__i1,__i2). In place,</a>
|
||
|
<a name="2002"><span class="lineNum"> 2002 </span> : : * the value of @a __str is inserted. If the length of result</a>
|
||
|
<a name="2003"><span class="lineNum"> 2003 </span> : : * exceeds max_size(), length_error is thrown. The value of</a>
|
||
|
<a name="2004"><span class="lineNum"> 2004 </span> : : * the string doesn't change if an error is thrown.</a>
|
||
|
<a name="2005"><span class="lineNum"> 2005 </span> : : */</a>
|
||
|
<a name="2006"><span class="lineNum"> 2006 </span> : : basic_string&</a>
|
||
|
<a name="2007"><span class="lineNum"> 2007 </span> : : replace(__const_iterator __i1, __const_iterator __i2,</a>
|
||
|
<a name="2008"><span class="lineNum"> 2008 </span> : : const basic_string& __str)</a>
|
||
|
<a name="2009"><span class="lineNum"> 2009 </span> : : { return this->replace(__i1, __i2, __str._M_data(), __str.size()); }</a>
|
||
|
<a name="2010"><span class="lineNum"> 2010 </span> : : </a>
|
||
|
<a name="2011"><span class="lineNum"> 2011 </span> : : /**</a>
|
||
|
<a name="2012"><span class="lineNum"> 2012 </span> : : * @brief Replace range of characters with C substring.</a>
|
||
|
<a name="2013"><span class="lineNum"> 2013 </span> : : * @param __i1 Iterator referencing start of range to replace.</a>
|
||
|
<a name="2014"><span class="lineNum"> 2014 </span> : : * @param __i2 Iterator referencing end of range to replace.</a>
|
||
|
<a name="2015"><span class="lineNum"> 2015 </span> : : * @param __s C string value to insert.</a>
|
||
|
<a name="2016"><span class="lineNum"> 2016 </span> : : * @param __n Number of characters from s to insert.</a>
|
||
|
<a name="2017"><span class="lineNum"> 2017 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="2018"><span class="lineNum"> 2018 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="2019"><span class="lineNum"> 2019 </span> : : *</a>
|
||
|
<a name="2020"><span class="lineNum"> 2020 </span> : : * Removes the characters in the range [__i1,__i2). In place,</a>
|
||
|
<a name="2021"><span class="lineNum"> 2021 </span> : : * the first @a __n characters of @a __s are inserted. If the</a>
|
||
|
<a name="2022"><span class="lineNum"> 2022 </span> : : * length of result exceeds max_size(), length_error is thrown.</a>
|
||
|
<a name="2023"><span class="lineNum"> 2023 </span> : : * The value of the string doesn't change if an error is</a>
|
||
|
<a name="2024"><span class="lineNum"> 2024 </span> : : * thrown.</a>
|
||
|
<a name="2025"><span class="lineNum"> 2025 </span> : : */</a>
|
||
|
<a name="2026"><span class="lineNum"> 2026 </span> : : basic_string&</a>
|
||
|
<a name="2027"><span class="lineNum"> 2027 </span> : : replace(__const_iterator __i1, __const_iterator __i2,</a>
|
||
|
<a name="2028"><span class="lineNum"> 2028 </span> : : const _CharT* __s, size_type __n)</a>
|
||
|
<a name="2029"><span class="lineNum"> 2029 </span> : : {</a>
|
||
|
<a name="2030"><span class="lineNum"> 2030 </span> : : _GLIBCXX_DEBUG_PEDASSERT(begin() <= __i1 && __i1 <= __i2</a>
|
||
|
<a name="2031"><span class="lineNum"> 2031 </span> : : && __i2 <= end());</a>
|
||
|
<a name="2032"><span class="lineNum"> 2032 </span> : : return this->replace(__i1 - begin(), __i2 - __i1, __s, __n);</a>
|
||
|
<a name="2033"><span class="lineNum"> 2033 </span> : : }</a>
|
||
|
<a name="2034"><span class="lineNum"> 2034 </span> : : </a>
|
||
|
<a name="2035"><span class="lineNum"> 2035 </span> : : /**</a>
|
||
|
<a name="2036"><span class="lineNum"> 2036 </span> : : * @brief Replace range of characters with C string.</a>
|
||
|
<a name="2037"><span class="lineNum"> 2037 </span> : : * @param __i1 Iterator referencing start of range to replace.</a>
|
||
|
<a name="2038"><span class="lineNum"> 2038 </span> : : * @param __i2 Iterator referencing end of range to replace.</a>
|
||
|
<a name="2039"><span class="lineNum"> 2039 </span> : : * @param __s C string value to insert.</a>
|
||
|
<a name="2040"><span class="lineNum"> 2040 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="2041"><span class="lineNum"> 2041 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="2042"><span class="lineNum"> 2042 </span> : : *</a>
|
||
|
<a name="2043"><span class="lineNum"> 2043 </span> : : * Removes the characters in the range [__i1,__i2). In place,</a>
|
||
|
<a name="2044"><span class="lineNum"> 2044 </span> : : * the characters of @a __s are inserted. If the length of</a>
|
||
|
<a name="2045"><span class="lineNum"> 2045 </span> : : * result exceeds max_size(), length_error is thrown. The</a>
|
||
|
<a name="2046"><span class="lineNum"> 2046 </span> : : * value of the string doesn't change if an error is thrown.</a>
|
||
|
<a name="2047"><span class="lineNum"> 2047 </span> : : */</a>
|
||
|
<a name="2048"><span class="lineNum"> 2048 </span> : : basic_string&</a>
|
||
|
<a name="2049"><span class="lineNum"> 2049 </span> : : replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __s)</a>
|
||
|
<a name="2050"><span class="lineNum"> 2050 </span> : : {</a>
|
||
|
<a name="2051"><span class="lineNum"> 2051 </span> : : __glibcxx_requires_string(__s);</a>
|
||
|
<a name="2052"><span class="lineNum"> 2052 </span> : : return this->replace(__i1, __i2, __s, traits_type::length(__s));</a>
|
||
|
<a name="2053"><span class="lineNum"> 2053 </span> : : }</a>
|
||
|
<a name="2054"><span class="lineNum"> 2054 </span> : : </a>
|
||
|
<a name="2055"><span class="lineNum"> 2055 </span> : : /**</a>
|
||
|
<a name="2056"><span class="lineNum"> 2056 </span> : : * @brief Replace range of characters with multiple characters</a>
|
||
|
<a name="2057"><span class="lineNum"> 2057 </span> : : * @param __i1 Iterator referencing start of range to replace.</a>
|
||
|
<a name="2058"><span class="lineNum"> 2058 </span> : : * @param __i2 Iterator referencing end of range to replace.</a>
|
||
|
<a name="2059"><span class="lineNum"> 2059 </span> : : * @param __n Number of characters to insert.</a>
|
||
|
<a name="2060"><span class="lineNum"> 2060 </span> : : * @param __c Character to insert.</a>
|
||
|
<a name="2061"><span class="lineNum"> 2061 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="2062"><span class="lineNum"> 2062 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="2063"><span class="lineNum"> 2063 </span> : : *</a>
|
||
|
<a name="2064"><span class="lineNum"> 2064 </span> : : * Removes the characters in the range [__i1,__i2). In place,</a>
|
||
|
<a name="2065"><span class="lineNum"> 2065 </span> : : * @a __n copies of @a __c are inserted. If the length of</a>
|
||
|
<a name="2066"><span class="lineNum"> 2066 </span> : : * result exceeds max_size(), length_error is thrown. The</a>
|
||
|
<a name="2067"><span class="lineNum"> 2067 </span> : : * value of the string doesn't change if an error is thrown.</a>
|
||
|
<a name="2068"><span class="lineNum"> 2068 </span> : : */</a>
|
||
|
<a name="2069"><span class="lineNum"> 2069 </span> : : basic_string&</a>
|
||
|
<a name="2070"><span class="lineNum"> 2070 </span> : : replace(__const_iterator __i1, __const_iterator __i2, size_type __n,</a>
|
||
|
<a name="2071"><span class="lineNum"> 2071 </span> : : _CharT __c)</a>
|
||
|
<a name="2072"><span class="lineNum"> 2072 </span> : : {</a>
|
||
|
<a name="2073"><span class="lineNum"> 2073 </span> : : _GLIBCXX_DEBUG_PEDASSERT(begin() <= __i1 && __i1 <= __i2</a>
|
||
|
<a name="2074"><span class="lineNum"> 2074 </span> : : && __i2 <= end());</a>
|
||
|
<a name="2075"><span class="lineNum"> 2075 </span> : : return _M_replace_aux(__i1 - begin(), __i2 - __i1, __n, __c);</a>
|
||
|
<a name="2076"><span class="lineNum"> 2076 </span> : : }</a>
|
||
|
<a name="2077"><span class="lineNum"> 2077 </span> : : </a>
|
||
|
<a name="2078"><span class="lineNum"> 2078 </span> : : /**</a>
|
||
|
<a name="2079"><span class="lineNum"> 2079 </span> : : * @brief Replace range of characters with range.</a>
|
||
|
<a name="2080"><span class="lineNum"> 2080 </span> : : * @param __i1 Iterator referencing start of range to replace.</a>
|
||
|
<a name="2081"><span class="lineNum"> 2081 </span> : : * @param __i2 Iterator referencing end of range to replace.</a>
|
||
|
<a name="2082"><span class="lineNum"> 2082 </span> : : * @param __k1 Iterator referencing start of range to insert.</a>
|
||
|
<a name="2083"><span class="lineNum"> 2083 </span> : : * @param __k2 Iterator referencing end of range to insert.</a>
|
||
|
<a name="2084"><span class="lineNum"> 2084 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="2085"><span class="lineNum"> 2085 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="2086"><span class="lineNum"> 2086 </span> : : *</a>
|
||
|
<a name="2087"><span class="lineNum"> 2087 </span> : : * Removes the characters in the range [__i1,__i2). In place,</a>
|
||
|
<a name="2088"><span class="lineNum"> 2088 </span> : : * characters in the range [__k1,__k2) are inserted. If the</a>
|
||
|
<a name="2089"><span class="lineNum"> 2089 </span> : : * length of result exceeds max_size(), length_error is thrown.</a>
|
||
|
<a name="2090"><span class="lineNum"> 2090 </span> : : * The value of the string doesn't change if an error is</a>
|
||
|
<a name="2091"><span class="lineNum"> 2091 </span> : : * thrown.</a>
|
||
|
<a name="2092"><span class="lineNum"> 2092 </span> : : */</a>
|
||
|
<a name="2093"><span class="lineNum"> 2093 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="2094"><span class="lineNum"> 2094 </span> : : template<class _InputIterator,</a>
|
||
|
<a name="2095"><span class="lineNum"> 2095 </span> : : typename = std::_RequireInputIter<_InputIterator>></a>
|
||
|
<a name="2096"><span class="lineNum"> 2096 </span> : : basic_string&</a>
|
||
|
<a name="2097"><span class="lineNum"> 2097 </span> : : replace(const_iterator __i1, const_iterator __i2,</a>
|
||
|
<a name="2098"><span class="lineNum"> 2098 </span> : : _InputIterator __k1, _InputIterator __k2)</a>
|
||
|
<a name="2099"><span class="lineNum"> 2099 </span> : : {</a>
|
||
|
<a name="2100"><span class="lineNum"> 2100 </span> : : _GLIBCXX_DEBUG_PEDASSERT(begin() <= __i1 && __i1 <= __i2</a>
|
||
|
<a name="2101"><span class="lineNum"> 2101 </span> : : && __i2 <= end());</a>
|
||
|
<a name="2102"><span class="lineNum"> 2102 </span> : : __glibcxx_requires_valid_range(__k1, __k2);</a>
|
||
|
<a name="2103"><span class="lineNum"> 2103 </span> : : return this->_M_replace_dispatch(__i1, __i2, __k1, __k2,</a>
|
||
|
<a name="2104"><span class="lineNum"> 2104 </span> : : std::__false_type());</a>
|
||
|
<a name="2105"><span class="lineNum"> 2105 </span> : : }</a>
|
||
|
<a name="2106"><span class="lineNum"> 2106 </span> : : #else</a>
|
||
|
<a name="2107"><span class="lineNum"> 2107 </span> : : template<class _InputIterator></a>
|
||
|
<a name="2108"><span class="lineNum"> 2108 </span> : : #ifdef _GLIBCXX_DISAMBIGUATE_REPLACE_INST</a>
|
||
|
<a name="2109"><span class="lineNum"> 2109 </span> : : typename __enable_if_not_native_iterator<_InputIterator>::__type</a>
|
||
|
<a name="2110"><span class="lineNum"> 2110 </span> : : #else</a>
|
||
|
<a name="2111"><span class="lineNum"> 2111 </span> : : basic_string&</a>
|
||
|
<a name="2112"><span class="lineNum"> 2112 </span> : : #endif</a>
|
||
|
<a name="2113"><span class="lineNum"> 2113 </span> : : replace(iterator __i1, iterator __i2,</a>
|
||
|
<a name="2114"><span class="lineNum"> 2114 </span> : : _InputIterator __k1, _InputIterator __k2)</a>
|
||
|
<a name="2115"><span class="lineNum"> 2115 </span> : : {</a>
|
||
|
<a name="2116"><span class="lineNum"> 2116 </span> : : _GLIBCXX_DEBUG_PEDASSERT(begin() <= __i1 && __i1 <= __i2</a>
|
||
|
<a name="2117"><span class="lineNum"> 2117 </span> : : && __i2 <= end());</a>
|
||
|
<a name="2118"><span class="lineNum"> 2118 </span> : : __glibcxx_requires_valid_range(__k1, __k2);</a>
|
||
|
<a name="2119"><span class="lineNum"> 2119 </span> : : typedef typename std::__is_integer<_InputIterator>::__type _Integral;</a>
|
||
|
<a name="2120"><span class="lineNum"> 2120 </span> : : return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral());</a>
|
||
|
<a name="2121"><span class="lineNum"> 2121 </span> : : }</a>
|
||
|
<a name="2122"><span class="lineNum"> 2122 </span> : : #endif</a>
|
||
|
<a name="2123"><span class="lineNum"> 2123 </span> : : </a>
|
||
|
<a name="2124"><span class="lineNum"> 2124 </span> : : // Specializations for the common case of pointer and iterator:</a>
|
||
|
<a name="2125"><span class="lineNum"> 2125 </span> : : // useful to avoid the overhead of temporary buffering in _M_replace.</a>
|
||
|
<a name="2126"><span class="lineNum"> 2126 </span> : : basic_string&</a>
|
||
|
<a name="2127"><span class="lineNum"> 2127 </span> : : replace(__const_iterator __i1, __const_iterator __i2,</a>
|
||
|
<a name="2128"><span class="lineNum"> 2128 </span> : : _CharT* __k1, _CharT* __k2)</a>
|
||
|
<a name="2129"><span class="lineNum"> 2129 </span> : : {</a>
|
||
|
<a name="2130"><span class="lineNum"> 2130 </span> : : _GLIBCXX_DEBUG_PEDASSERT(begin() <= __i1 && __i1 <= __i2</a>
|
||
|
<a name="2131"><span class="lineNum"> 2131 </span> : : && __i2 <= end());</a>
|
||
|
<a name="2132"><span class="lineNum"> 2132 </span> : : __glibcxx_requires_valid_range(__k1, __k2);</a>
|
||
|
<a name="2133"><span class="lineNum"> 2133 </span> : : return this->replace(__i1 - begin(), __i2 - __i1,</a>
|
||
|
<a name="2134"><span class="lineNum"> 2134 </span> : : __k1, __k2 - __k1);</a>
|
||
|
<a name="2135"><span class="lineNum"> 2135 </span> : : }</a>
|
||
|
<a name="2136"><span class="lineNum"> 2136 </span> : : </a>
|
||
|
<a name="2137"><span class="lineNum"> 2137 </span> : : basic_string&</a>
|
||
|
<a name="2138"><span class="lineNum"> 2138 </span> : : replace(__const_iterator __i1, __const_iterator __i2,</a>
|
||
|
<a name="2139"><span class="lineNum"> 2139 </span> : : const _CharT* __k1, const _CharT* __k2)</a>
|
||
|
<a name="2140"><span class="lineNum"> 2140 </span> : : {</a>
|
||
|
<a name="2141"><span class="lineNum"> 2141 </span> : : _GLIBCXX_DEBUG_PEDASSERT(begin() <= __i1 && __i1 <= __i2</a>
|
||
|
<a name="2142"><span class="lineNum"> 2142 </span> : : && __i2 <= end());</a>
|
||
|
<a name="2143"><span class="lineNum"> 2143 </span> : : __glibcxx_requires_valid_range(__k1, __k2);</a>
|
||
|
<a name="2144"><span class="lineNum"> 2144 </span> : : return this->replace(__i1 - begin(), __i2 - __i1,</a>
|
||
|
<a name="2145"><span class="lineNum"> 2145 </span> : : __k1, __k2 - __k1);</a>
|
||
|
<a name="2146"><span class="lineNum"> 2146 </span> : : }</a>
|
||
|
<a name="2147"><span class="lineNum"> 2147 </span> : : </a>
|
||
|
<a name="2148"><span class="lineNum"> 2148 </span> : : basic_string&</a>
|
||
|
<a name="2149"><span class="lineNum"> 2149 </span> : : replace(__const_iterator __i1, __const_iterator __i2,</a>
|
||
|
<a name="2150"><span class="lineNum"> 2150 </span> : : iterator __k1, iterator __k2)</a>
|
||
|
<a name="2151"><span class="lineNum"> 2151 </span> : : {</a>
|
||
|
<a name="2152"><span class="lineNum"> 2152 </span> : : _GLIBCXX_DEBUG_PEDASSERT(begin() <= __i1 && __i1 <= __i2</a>
|
||
|
<a name="2153"><span class="lineNum"> 2153 </span> : : && __i2 <= end());</a>
|
||
|
<a name="2154"><span class="lineNum"> 2154 </span> : : __glibcxx_requires_valid_range(__k1, __k2);</a>
|
||
|
<a name="2155"><span class="lineNum"> 2155 </span> : : return this->replace(__i1 - begin(), __i2 - __i1,</a>
|
||
|
<a name="2156"><span class="lineNum"> 2156 </span> : : __k1.base(), __k2 - __k1);</a>
|
||
|
<a name="2157"><span class="lineNum"> 2157 </span> : : }</a>
|
||
|
<a name="2158"><span class="lineNum"> 2158 </span> : : </a>
|
||
|
<a name="2159"><span class="lineNum"> 2159 </span> : : basic_string&</a>
|
||
|
<a name="2160"><span class="lineNum"> 2160 </span> : : replace(__const_iterator __i1, __const_iterator __i2,</a>
|
||
|
<a name="2161"><span class="lineNum"> 2161 </span> : : const_iterator __k1, const_iterator __k2)</a>
|
||
|
<a name="2162"><span class="lineNum"> 2162 </span> : : {</a>
|
||
|
<a name="2163"><span class="lineNum"> 2163 </span> : : _GLIBCXX_DEBUG_PEDASSERT(begin() <= __i1 && __i1 <= __i2</a>
|
||
|
<a name="2164"><span class="lineNum"> 2164 </span> : : && __i2 <= end());</a>
|
||
|
<a name="2165"><span class="lineNum"> 2165 </span> : : __glibcxx_requires_valid_range(__k1, __k2);</a>
|
||
|
<a name="2166"><span class="lineNum"> 2166 </span> : : return this->replace(__i1 - begin(), __i2 - __i1,</a>
|
||
|
<a name="2167"><span class="lineNum"> 2167 </span> : : __k1.base(), __k2 - __k1);</a>
|
||
|
<a name="2168"><span class="lineNum"> 2168 </span> : : }</a>
|
||
|
<a name="2169"><span class="lineNum"> 2169 </span> : : </a>
|
||
|
<a name="2170"><span class="lineNum"> 2170 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="2171"><span class="lineNum"> 2171 </span> : : /**</a>
|
||
|
<a name="2172"><span class="lineNum"> 2172 </span> : : * @brief Replace range of characters with initializer_list.</a>
|
||
|
<a name="2173"><span class="lineNum"> 2173 </span> : : * @param __i1 Iterator referencing start of range to replace.</a>
|
||
|
<a name="2174"><span class="lineNum"> 2174 </span> : : * @param __i2 Iterator referencing end of range to replace.</a>
|
||
|
<a name="2175"><span class="lineNum"> 2175 </span> : : * @param __l The initializer_list of characters to insert.</a>
|
||
|
<a name="2176"><span class="lineNum"> 2176 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="2177"><span class="lineNum"> 2177 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="2178"><span class="lineNum"> 2178 </span> : : *</a>
|
||
|
<a name="2179"><span class="lineNum"> 2179 </span> : : * Removes the characters in the range [__i1,__i2). In place,</a>
|
||
|
<a name="2180"><span class="lineNum"> 2180 </span> : : * characters in the range [__k1,__k2) are inserted. If the</a>
|
||
|
<a name="2181"><span class="lineNum"> 2181 </span> : : * length of result exceeds max_size(), length_error is thrown.</a>
|
||
|
<a name="2182"><span class="lineNum"> 2182 </span> : : * The value of the string doesn't change if an error is</a>
|
||
|
<a name="2183"><span class="lineNum"> 2183 </span> : : * thrown.</a>
|
||
|
<a name="2184"><span class="lineNum"> 2184 </span> : : */</a>
|
||
|
<a name="2185"><span class="lineNum"> 2185 </span> : : basic_string& replace(const_iterator __i1, const_iterator __i2,</a>
|
||
|
<a name="2186"><span class="lineNum"> 2186 </span> : : initializer_list<_CharT> __l)</a>
|
||
|
<a name="2187"><span class="lineNum"> 2187 </span> : : { return this->replace(__i1, __i2, __l.begin(), __l.size()); }</a>
|
||
|
<a name="2188"><span class="lineNum"> 2188 </span> : : #endif // C++11</a>
|
||
|
<a name="2189"><span class="lineNum"> 2189 </span> : : </a>
|
||
|
<a name="2190"><span class="lineNum"> 2190 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="2191"><span class="lineNum"> 2191 </span> : : /**</a>
|
||
|
<a name="2192"><span class="lineNum"> 2192 </span> : : * @brief Replace range of characters with string_view.</a>
|
||
|
<a name="2193"><span class="lineNum"> 2193 </span> : : * @param __pos The position to replace at.</a>
|
||
|
<a name="2194"><span class="lineNum"> 2194 </span> : : * @param __n The number of characters to replace.</a>
|
||
|
<a name="2195"><span class="lineNum"> 2195 </span> : : * @param __svt The object convertible to string_view to insert.</a>
|
||
|
<a name="2196"><span class="lineNum"> 2196 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="2197"><span class="lineNum"> 2197 </span> : : */</a>
|
||
|
<a name="2198"><span class="lineNum"> 2198 </span> : : template<typename _Tp></a>
|
||
|
<a name="2199"><span class="lineNum"> 2199 </span> : : _If_sv<_Tp, basic_string&></a>
|
||
|
<a name="2200"><span class="lineNum"> 2200 </span> : : replace(size_type __pos, size_type __n, const _Tp& __svt)</a>
|
||
|
<a name="2201"><span class="lineNum"> 2201 </span> : : {</a>
|
||
|
<a name="2202"><span class="lineNum"> 2202 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="2203"><span class="lineNum"> 2203 </span> : : return this->replace(__pos, __n, __sv.data(), __sv.size());</a>
|
||
|
<a name="2204"><span class="lineNum"> 2204 </span> : : }</a>
|
||
|
<a name="2205"><span class="lineNum"> 2205 </span> : : </a>
|
||
|
<a name="2206"><span class="lineNum"> 2206 </span> : : /**</a>
|
||
|
<a name="2207"><span class="lineNum"> 2207 </span> : : * @brief Replace range of characters with string_view.</a>
|
||
|
<a name="2208"><span class="lineNum"> 2208 </span> : : * @param __pos1 The position to replace at.</a>
|
||
|
<a name="2209"><span class="lineNum"> 2209 </span> : : * @param __n1 The number of characters to replace.</a>
|
||
|
<a name="2210"><span class="lineNum"> 2210 </span> : : * @param __svt The object convertible to string_view to insert from.</a>
|
||
|
<a name="2211"><span class="lineNum"> 2211 </span> : : * @param __pos2 The position in the string_view to insert from.</a>
|
||
|
<a name="2212"><span class="lineNum"> 2212 </span> : : * @param __n2 The number of characters to insert.</a>
|
||
|
<a name="2213"><span class="lineNum"> 2213 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="2214"><span class="lineNum"> 2214 </span> : : */</a>
|
||
|
<a name="2215"><span class="lineNum"> 2215 </span> : : template<typename _Tp></a>
|
||
|
<a name="2216"><span class="lineNum"> 2216 </span> : : _If_sv<_Tp, basic_string&></a>
|
||
|
<a name="2217"><span class="lineNum"> 2217 </span> : : replace(size_type __pos1, size_type __n1, const _Tp& __svt,</a>
|
||
|
<a name="2218"><span class="lineNum"> 2218 </span> : : size_type __pos2, size_type __n2 = npos)</a>
|
||
|
<a name="2219"><span class="lineNum"> 2219 </span> : : {</a>
|
||
|
<a name="2220"><span class="lineNum"> 2220 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="2221"><span class="lineNum"> 2221 </span> : : return this->replace(__pos1, __n1,</a>
|
||
|
<a name="2222"><span class="lineNum"> 2222 </span> : : __sv.data()</a>
|
||
|
<a name="2223"><span class="lineNum"> 2223 </span> : : + std::__sv_check(__sv.size(), __pos2, "basic_string::replace"),</a>
|
||
|
<a name="2224"><span class="lineNum"> 2224 </span> : : std::__sv_limit(__sv.size(), __pos2, __n2));</a>
|
||
|
<a name="2225"><span class="lineNum"> 2225 </span> : : }</a>
|
||
|
<a name="2226"><span class="lineNum"> 2226 </span> : : </a>
|
||
|
<a name="2227"><span class="lineNum"> 2227 </span> : : /**</a>
|
||
|
<a name="2228"><span class="lineNum"> 2228 </span> : : * @brief Replace range of characters with string_view.</a>
|
||
|
<a name="2229"><span class="lineNum"> 2229 </span> : : * @param __i1 An iterator referencing the start position</a>
|
||
|
<a name="2230"><span class="lineNum"> 2230 </span> : : to replace at.</a>
|
||
|
<a name="2231"><span class="lineNum"> 2231 </span> : : * @param __i2 An iterator referencing the end position</a>
|
||
|
<a name="2232"><span class="lineNum"> 2232 </span> : : for the replace.</a>
|
||
|
<a name="2233"><span class="lineNum"> 2233 </span> : : * @param __svt The object convertible to string_view to insert from.</a>
|
||
|
<a name="2234"><span class="lineNum"> 2234 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="2235"><span class="lineNum"> 2235 </span> : : */</a>
|
||
|
<a name="2236"><span class="lineNum"> 2236 </span> : : template<typename _Tp></a>
|
||
|
<a name="2237"><span class="lineNum"> 2237 </span> : : _If_sv<_Tp, basic_string&></a>
|
||
|
<a name="2238"><span class="lineNum"> 2238 </span> : : replace(const_iterator __i1, const_iterator __i2, const _Tp& __svt)</a>
|
||
|
<a name="2239"><span class="lineNum"> 2239 </span> : : {</a>
|
||
|
<a name="2240"><span class="lineNum"> 2240 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="2241"><span class="lineNum"> 2241 </span> : : return this->replace(__i1 - begin(), __i2 - __i1, __sv);</a>
|
||
|
<a name="2242"><span class="lineNum"> 2242 </span> : : }</a>
|
||
|
<a name="2243"><span class="lineNum"> 2243 </span> : : #endif // C++17</a>
|
||
|
<a name="2244"><span class="lineNum"> 2244 </span> : : </a>
|
||
|
<a name="2245"><span class="lineNum"> 2245 </span> : : private:</a>
|
||
|
<a name="2246"><span class="lineNum"> 2246 </span> : : template<class _Integer></a>
|
||
|
<a name="2247"><span class="lineNum"> 2247 </span> : : basic_string&</a>
|
||
|
<a name="2248"><span class="lineNum"> 2248 </span> : : _M_replace_dispatch(const_iterator __i1, const_iterator __i2,</a>
|
||
|
<a name="2249"><span class="lineNum"> 2249 </span> : : _Integer __n, _Integer __val, __true_type)</a>
|
||
|
<a name="2250"><span class="lineNum"> 2250 </span> : : { return _M_replace_aux(__i1 - begin(), __i2 - __i1, __n, __val); }</a>
|
||
|
<a name="2251"><span class="lineNum"> 2251 </span> : : </a>
|
||
|
<a name="2252"><span class="lineNum"> 2252 </span> : : template<class _InputIterator></a>
|
||
|
<a name="2253"><span class="lineNum"> 2253 </span> : : basic_string&</a>
|
||
|
<a name="2254"><span class="lineNum"> 2254 </span> : : _M_replace_dispatch(const_iterator __i1, const_iterator __i2,</a>
|
||
|
<a name="2255"><span class="lineNum"> 2255 </span> : : _InputIterator __k1, _InputIterator __k2,</a>
|
||
|
<a name="2256"><span class="lineNum"> 2256 </span> : : __false_type);</a>
|
||
|
<a name="2257"><span class="lineNum"> 2257 </span> : : </a>
|
||
|
<a name="2258"><span class="lineNum"> 2258 </span> : : basic_string&</a>
|
||
|
<a name="2259"><span class="lineNum"> 2259 </span> : : _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2,</a>
|
||
|
<a name="2260"><span class="lineNum"> 2260 </span> : : _CharT __c);</a>
|
||
|
<a name="2261"><span class="lineNum"> 2261 </span> : : </a>
|
||
|
<a name="2262"><span class="lineNum"> 2262 </span> : : basic_string&</a>
|
||
|
<a name="2263"><span class="lineNum"> 2263 </span> : : _M_replace(size_type __pos, size_type __len1, const _CharT* __s,</a>
|
||
|
<a name="2264"><span class="lineNum"> 2264 </span> : : const size_type __len2);</a>
|
||
|
<a name="2265"><span class="lineNum"> 2265 </span> : : </a>
|
||
|
<a name="2266"><span class="lineNum"> 2266 </span> : : basic_string&</a>
|
||
|
<a name="2267"><span class="lineNum"> 2267 </span> : : _M_append(const _CharT* __s, size_type __n);</a>
|
||
|
<a name="2268"><span class="lineNum"> 2268 </span> : : </a>
|
||
|
<a name="2269"><span class="lineNum"> 2269 </span> : : public:</a>
|
||
|
<a name="2270"><span class="lineNum"> 2270 </span> : : </a>
|
||
|
<a name="2271"><span class="lineNum"> 2271 </span> : : /**</a>
|
||
|
<a name="2272"><span class="lineNum"> 2272 </span> : : * @brief Copy substring into C string.</a>
|
||
|
<a name="2273"><span class="lineNum"> 2273 </span> : : * @param __s C string to copy value into.</a>
|
||
|
<a name="2274"><span class="lineNum"> 2274 </span> : : * @param __n Number of characters to copy.</a>
|
||
|
<a name="2275"><span class="lineNum"> 2275 </span> : : * @param __pos Index of first character to copy.</a>
|
||
|
<a name="2276"><span class="lineNum"> 2276 </span> : : * @return Number of characters actually copied</a>
|
||
|
<a name="2277"><span class="lineNum"> 2277 </span> : : * @throw std::out_of_range If __pos > size().</a>
|
||
|
<a name="2278"><span class="lineNum"> 2278 </span> : : *</a>
|
||
|
<a name="2279"><span class="lineNum"> 2279 </span> : : * Copies up to @a __n characters starting at @a __pos into the</a>
|
||
|
<a name="2280"><span class="lineNum"> 2280 </span> : : * C string @a __s. If @a __pos is %greater than size(),</a>
|
||
|
<a name="2281"><span class="lineNum"> 2281 </span> : : * out_of_range is thrown.</a>
|
||
|
<a name="2282"><span class="lineNum"> 2282 </span> : : */</a>
|
||
|
<a name="2283"><span class="lineNum"> 2283 </span> : : size_type</a>
|
||
|
<a name="2284"><span class="lineNum"> 2284 </span> : : copy(_CharT* __s, size_type __n, size_type __pos = 0) const;</a>
|
||
|
<a name="2285"><span class="lineNum"> 2285 </span> : : </a>
|
||
|
<a name="2286"><span class="lineNum"> 2286 </span> : : /**</a>
|
||
|
<a name="2287"><span class="lineNum"> 2287 </span> : : * @brief Swap contents with another string.</a>
|
||
|
<a name="2288"><span class="lineNum"> 2288 </span> : : * @param __s String to swap with.</a>
|
||
|
<a name="2289"><span class="lineNum"> 2289 </span> : : *</a>
|
||
|
<a name="2290"><span class="lineNum"> 2290 </span> : : * Exchanges the contents of this string with that of @a __s in constant</a>
|
||
|
<a name="2291"><span class="lineNum"> 2291 </span> : : * time.</a>
|
||
|
<a name="2292"><span class="lineNum"> 2292 </span> : : */</a>
|
||
|
<a name="2293"><span class="lineNum"> 2293 </span> : : void</a>
|
||
|
<a name="2294"><span class="lineNum"> 2294 </span> : : swap(basic_string& __s) _GLIBCXX_NOEXCEPT;</a>
|
||
|
<a name="2295"><span class="lineNum"> 2295 </span> : : </a>
|
||
|
<a name="2296"><span class="lineNum"> 2296 </span> : : // String operations:</a>
|
||
|
<a name="2297"><span class="lineNum"> 2297 </span> : : /**</a>
|
||
|
<a name="2298"><span class="lineNum"> 2298 </span> : : * @brief Return const pointer to null-terminated contents.</a>
|
||
|
<a name="2299"><span class="lineNum"> 2299 </span> : : *</a>
|
||
|
<a name="2300"><span class="lineNum"> 2300 </span> : : * This is a handle to internal data. Do not modify or dire things may</a>
|
||
|
<a name="2301"><span class="lineNum"> 2301 </span> : : * happen.</a>
|
||
|
<a name="2302"><span class="lineNum"> 2302 </span> : : */</a>
|
||
|
<a name="2303"><span class="lineNum"> 2303 </span> : : const _CharT*</a>
|
||
|
<a name="2304"><span class="lineNum"> 2304 </span> : : c_str() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="2305"><span class="lineNum"> 2305 </span> : : { return _M_data(); }</a>
|
||
|
<a name="2306"><span class="lineNum"> 2306 </span> : : </a>
|
||
|
<a name="2307"><span class="lineNum"> 2307 </span> : : /**</a>
|
||
|
<a name="2308"><span class="lineNum"> 2308 </span> : : * @brief Return const pointer to contents.</a>
|
||
|
<a name="2309"><span class="lineNum"> 2309 </span> : : *</a>
|
||
|
<a name="2310"><span class="lineNum"> 2310 </span> : : * This is a pointer to internal data. It is undefined to modify</a>
|
||
|
<a name="2311"><span class="lineNum"> 2311 </span> : : * the contents through the returned pointer. To get a pointer that</a>
|
||
|
<a name="2312"><span class="lineNum"> 2312 </span> : : * allows modifying the contents use @c &str[0] instead,</a>
|
||
|
<a name="2313"><span class="lineNum"> 2313 </span> : : * (or in C++17 the non-const @c str.data() overload).</a>
|
||
|
<a name="2314"><span class="lineNum"> 2314 </span> : : */</a>
|
||
|
<a name="2315"><span class="lineNum"> 2315 </span> : : const _CharT*</a>
|
||
|
<a name="2316"><span class="lineNum"> 2316 </span> : : data() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="2317"><span class="lineNum"> 2317 </span> : : { return _M_data(); }</a>
|
||
|
<a name="2318"><span class="lineNum"> 2318 </span> : : </a>
|
||
|
<a name="2319"><span class="lineNum"> 2319 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="2320"><span class="lineNum"> 2320 </span> : : /**</a>
|
||
|
<a name="2321"><span class="lineNum"> 2321 </span> : : * @brief Return non-const pointer to contents.</a>
|
||
|
<a name="2322"><span class="lineNum"> 2322 </span> : : *</a>
|
||
|
<a name="2323"><span class="lineNum"> 2323 </span> : : * This is a pointer to the character sequence held by the string.</a>
|
||
|
<a name="2324"><span class="lineNum"> 2324 </span> : : * Modifying the characters in the sequence is allowed.</a>
|
||
|
<a name="2325"><span class="lineNum"> 2325 </span> : : */</a>
|
||
|
<a name="2326"><span class="lineNum"> 2326 </span> : : _CharT*</a>
|
||
|
<a name="2327"><span class="lineNum"> 2327 </span> : : data() noexcept</a>
|
||
|
<a name="2328"><span class="lineNum"> 2328 </span> : : { return _M_data(); }</a>
|
||
|
<a name="2329"><span class="lineNum"> 2329 </span> : : #endif</a>
|
||
|
<a name="2330"><span class="lineNum"> 2330 </span> : : </a>
|
||
|
<a name="2331"><span class="lineNum"> 2331 </span> : : /**</a>
|
||
|
<a name="2332"><span class="lineNum"> 2332 </span> : : * @brief Return copy of allocator used to construct this string.</a>
|
||
|
<a name="2333"><span class="lineNum"> 2333 </span> : : */</a>
|
||
|
<a name="2334"><span class="lineNum"> 2334 </span> : : allocator_type</a>
|
||
|
<a name="2335"><span class="lineNum"> 2335 </span> : : get_allocator() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="2336"><span class="lineNum"> 2336 </span> : : { return _M_get_allocator(); }</a>
|
||
|
<a name="2337"><span class="lineNum"> 2337 </span> : : </a>
|
||
|
<a name="2338"><span class="lineNum"> 2338 </span> : : /**</a>
|
||
|
<a name="2339"><span class="lineNum"> 2339 </span> : : * @brief Find position of a C substring.</a>
|
||
|
<a name="2340"><span class="lineNum"> 2340 </span> : : * @param __s C string to locate.</a>
|
||
|
<a name="2341"><span class="lineNum"> 2341 </span> : : * @param __pos Index of character to search from.</a>
|
||
|
<a name="2342"><span class="lineNum"> 2342 </span> : : * @param __n Number of characters from @a s to search for.</a>
|
||
|
<a name="2343"><span class="lineNum"> 2343 </span> : : * @return Index of start of first occurrence.</a>
|
||
|
<a name="2344"><span class="lineNum"> 2344 </span> : : *</a>
|
||
|
<a name="2345"><span class="lineNum"> 2345 </span> : : * Starting from @a __pos, searches forward for the first @a</a>
|
||
|
<a name="2346"><span class="lineNum"> 2346 </span> : : * __n characters in @a __s within this string. If found,</a>
|
||
|
<a name="2347"><span class="lineNum"> 2347 </span> : : * returns the index where it begins. If not found, returns</a>
|
||
|
<a name="2348"><span class="lineNum"> 2348 </span> : : * npos.</a>
|
||
|
<a name="2349"><span class="lineNum"> 2349 </span> : : */</a>
|
||
|
<a name="2350"><span class="lineNum"> 2350 </span> : : size_type</a>
|
||
|
<a name="2351"><span class="lineNum"> 2351 </span> : : find(const _CharT* __s, size_type __pos, size_type __n) const</a>
|
||
|
<a name="2352"><span class="lineNum"> 2352 </span> : : _GLIBCXX_NOEXCEPT;</a>
|
||
|
<a name="2353"><span class="lineNum"> 2353 </span> : : </a>
|
||
|
<a name="2354"><span class="lineNum"> 2354 </span> : : /**</a>
|
||
|
<a name="2355"><span class="lineNum"> 2355 </span> : : * @brief Find position of a string.</a>
|
||
|
<a name="2356"><span class="lineNum"> 2356 </span> : : * @param __str String to locate.</a>
|
||
|
<a name="2357"><span class="lineNum"> 2357 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="2358"><span class="lineNum"> 2358 </span> : : * @return Index of start of first occurrence.</a>
|
||
|
<a name="2359"><span class="lineNum"> 2359 </span> : : *</a>
|
||
|
<a name="2360"><span class="lineNum"> 2360 </span> : : * Starting from @a __pos, searches forward for value of @a __str within</a>
|
||
|
<a name="2361"><span class="lineNum"> 2361 </span> : : * this string. If found, returns the index where it begins. If not</a>
|
||
|
<a name="2362"><span class="lineNum"> 2362 </span> : : * found, returns npos.</a>
|
||
|
<a name="2363"><span class="lineNum"> 2363 </span> : : */</a>
|
||
|
<a name="2364"><span class="lineNum"> 2364 </span> : : size_type</a>
|
||
|
<a name="2365"><span class="lineNum"> 2365 </span> : : find(const basic_string& __str, size_type __pos = 0) const</a>
|
||
|
<a name="2366"><span class="lineNum"> 2366 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="2367"><span class="lineNum"> 2367 </span> : : { return this->find(__str.data(), __pos, __str.size()); }</a>
|
||
|
<a name="2368"><span class="lineNum"> 2368 </span> : : </a>
|
||
|
<a name="2369"><span class="lineNum"> 2369 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="2370"><span class="lineNum"> 2370 </span> : : /**</a>
|
||
|
<a name="2371"><span class="lineNum"> 2371 </span> : : * @brief Find position of a string_view.</a>
|
||
|
<a name="2372"><span class="lineNum"> 2372 </span> : : * @param __svt The object convertible to string_view to locate.</a>
|
||
|
<a name="2373"><span class="lineNum"> 2373 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="2374"><span class="lineNum"> 2374 </span> : : * @return Index of start of first occurrence.</a>
|
||
|
<a name="2375"><span class="lineNum"> 2375 </span> : : */</a>
|
||
|
<a name="2376"><span class="lineNum"> 2376 </span> : : template<typename _Tp></a>
|
||
|
<a name="2377"><span class="lineNum"> 2377 </span> : : _If_sv<_Tp, size_type></a>
|
||
|
<a name="2378"><span class="lineNum"> 2378 </span> : : find(const _Tp& __svt, size_type __pos = 0) const</a>
|
||
|
<a name="2379"><span class="lineNum"> 2379 </span> : : noexcept(is_same<_Tp, __sv_type>::value)</a>
|
||
|
<a name="2380"><span class="lineNum"> 2380 </span> : : {</a>
|
||
|
<a name="2381"><span class="lineNum"> 2381 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="2382"><span class="lineNum"> 2382 </span> : : return this->find(__sv.data(), __pos, __sv.size());</a>
|
||
|
<a name="2383"><span class="lineNum"> 2383 </span> : : }</a>
|
||
|
<a name="2384"><span class="lineNum"> 2384 </span> : : #endif // C++17</a>
|
||
|
<a name="2385"><span class="lineNum"> 2385 </span> : : </a>
|
||
|
<a name="2386"><span class="lineNum"> 2386 </span> : : /**</a>
|
||
|
<a name="2387"><span class="lineNum"> 2387 </span> : : * @brief Find position of a C string.</a>
|
||
|
<a name="2388"><span class="lineNum"> 2388 </span> : : * @param __s C string to locate.</a>
|
||
|
<a name="2389"><span class="lineNum"> 2389 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="2390"><span class="lineNum"> 2390 </span> : : * @return Index of start of first occurrence.</a>
|
||
|
<a name="2391"><span class="lineNum"> 2391 </span> : : *</a>
|
||
|
<a name="2392"><span class="lineNum"> 2392 </span> : : * Starting from @a __pos, searches forward for the value of @a</a>
|
||
|
<a name="2393"><span class="lineNum"> 2393 </span> : : * __s within this string. If found, returns the index where</a>
|
||
|
<a name="2394"><span class="lineNum"> 2394 </span> : : * it begins. If not found, returns npos.</a>
|
||
|
<a name="2395"><span class="lineNum"> 2395 </span> : : */</a>
|
||
|
<a name="2396"><span class="lineNum"> 2396 </span> : : size_type</a>
|
||
|
<a name="2397"><span class="lineNum"> 2397 </span> : : find(const _CharT* __s, size_type __pos = 0) const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="2398"><span class="lineNum"> 2398 </span> : : {</a>
|
||
|
<a name="2399"><span class="lineNum"> 2399 </span> : : __glibcxx_requires_string(__s);</a>
|
||
|
<a name="2400"><span class="lineNum"> 2400 </span> : : return this->find(__s, __pos, traits_type::length(__s));</a>
|
||
|
<a name="2401"><span class="lineNum"> 2401 </span> : : }</a>
|
||
|
<a name="2402"><span class="lineNum"> 2402 </span> : : </a>
|
||
|
<a name="2403"><span class="lineNum"> 2403 </span> : : /**</a>
|
||
|
<a name="2404"><span class="lineNum"> 2404 </span> : : * @brief Find position of a character.</a>
|
||
|
<a name="2405"><span class="lineNum"> 2405 </span> : : * @param __c Character to locate.</a>
|
||
|
<a name="2406"><span class="lineNum"> 2406 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="2407"><span class="lineNum"> 2407 </span> : : * @return Index of first occurrence.</a>
|
||
|
<a name="2408"><span class="lineNum"> 2408 </span> : : *</a>
|
||
|
<a name="2409"><span class="lineNum"> 2409 </span> : : * Starting from @a __pos, searches forward for @a __c within</a>
|
||
|
<a name="2410"><span class="lineNum"> 2410 </span> : : * this string. If found, returns the index where it was</a>
|
||
|
<a name="2411"><span class="lineNum"> 2411 </span> : : * found. If not found, returns npos.</a>
|
||
|
<a name="2412"><span class="lineNum"> 2412 </span> : : */</a>
|
||
|
<a name="2413"><span class="lineNum"> 2413 </span> : : size_type</a>
|
||
|
<a name="2414"><span class="lineNum"> 2414 </span> : : find(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT;</a>
|
||
|
<a name="2415"><span class="lineNum"> 2415 </span> : : </a>
|
||
|
<a name="2416"><span class="lineNum"> 2416 </span> : : /**</a>
|
||
|
<a name="2417"><span class="lineNum"> 2417 </span> : : * @brief Find last position of a string.</a>
|
||
|
<a name="2418"><span class="lineNum"> 2418 </span> : : * @param __str String to locate.</a>
|
||
|
<a name="2419"><span class="lineNum"> 2419 </span> : : * @param __pos Index of character to search back from (default end).</a>
|
||
|
<a name="2420"><span class="lineNum"> 2420 </span> : : * @return Index of start of last occurrence.</a>
|
||
|
<a name="2421"><span class="lineNum"> 2421 </span> : : *</a>
|
||
|
<a name="2422"><span class="lineNum"> 2422 </span> : : * Starting from @a __pos, searches backward for value of @a</a>
|
||
|
<a name="2423"><span class="lineNum"> 2423 </span> : : * __str within this string. If found, returns the index where</a>
|
||
|
<a name="2424"><span class="lineNum"> 2424 </span> : : * it begins. If not found, returns npos.</a>
|
||
|
<a name="2425"><span class="lineNum"> 2425 </span> : : */</a>
|
||
|
<a name="2426"><span class="lineNum"> 2426 </span> : : size_type</a>
|
||
|
<a name="2427"><span class="lineNum"> 2427 </span> : : rfind(const basic_string& __str, size_type __pos = npos) const</a>
|
||
|
<a name="2428"><span class="lineNum"> 2428 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="2429"><span class="lineNum"> 2429 </span> : : { return this->rfind(__str.data(), __pos, __str.size()); }</a>
|
||
|
<a name="2430"><span class="lineNum"> 2430 </span> : : </a>
|
||
|
<a name="2431"><span class="lineNum"> 2431 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="2432"><span class="lineNum"> 2432 </span> : : /**</a>
|
||
|
<a name="2433"><span class="lineNum"> 2433 </span> : : * @brief Find last position of a string_view.</a>
|
||
|
<a name="2434"><span class="lineNum"> 2434 </span> : : * @param __svt The object convertible to string_view to locate.</a>
|
||
|
<a name="2435"><span class="lineNum"> 2435 </span> : : * @param __pos Index of character to search back from (default end).</a>
|
||
|
<a name="2436"><span class="lineNum"> 2436 </span> : : * @return Index of start of last occurrence.</a>
|
||
|
<a name="2437"><span class="lineNum"> 2437 </span> : : */</a>
|
||
|
<a name="2438"><span class="lineNum"> 2438 </span> : : template<typename _Tp></a>
|
||
|
<a name="2439"><span class="lineNum"> 2439 </span> : : _If_sv<_Tp, size_type></a>
|
||
|
<a name="2440"><span class="lineNum"> 2440 </span> : : rfind(const _Tp& __svt, size_type __pos = npos) const</a>
|
||
|
<a name="2441"><span class="lineNum"> 2441 </span> : : noexcept(is_same<_Tp, __sv_type>::value)</a>
|
||
|
<a name="2442"><span class="lineNum"> 2442 </span> : : {</a>
|
||
|
<a name="2443"><span class="lineNum"> 2443 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="2444"><span class="lineNum"> 2444 </span> : : return this->rfind(__sv.data(), __pos, __sv.size());</a>
|
||
|
<a name="2445"><span class="lineNum"> 2445 </span> : : }</a>
|
||
|
<a name="2446"><span class="lineNum"> 2446 </span> : : #endif // C++17</a>
|
||
|
<a name="2447"><span class="lineNum"> 2447 </span> : : </a>
|
||
|
<a name="2448"><span class="lineNum"> 2448 </span> : : /**</a>
|
||
|
<a name="2449"><span class="lineNum"> 2449 </span> : : * @brief Find last position of a C substring.</a>
|
||
|
<a name="2450"><span class="lineNum"> 2450 </span> : : * @param __s C string to locate.</a>
|
||
|
<a name="2451"><span class="lineNum"> 2451 </span> : : * @param __pos Index of character to search back from.</a>
|
||
|
<a name="2452"><span class="lineNum"> 2452 </span> : : * @param __n Number of characters from s to search for.</a>
|
||
|
<a name="2453"><span class="lineNum"> 2453 </span> : : * @return Index of start of last occurrence.</a>
|
||
|
<a name="2454"><span class="lineNum"> 2454 </span> : : *</a>
|
||
|
<a name="2455"><span class="lineNum"> 2455 </span> : : * Starting from @a __pos, searches backward for the first @a</a>
|
||
|
<a name="2456"><span class="lineNum"> 2456 </span> : : * __n characters in @a __s within this string. If found,</a>
|
||
|
<a name="2457"><span class="lineNum"> 2457 </span> : : * returns the index where it begins. If not found, returns</a>
|
||
|
<a name="2458"><span class="lineNum"> 2458 </span> : : * npos.</a>
|
||
|
<a name="2459"><span class="lineNum"> 2459 </span> : : */</a>
|
||
|
<a name="2460"><span class="lineNum"> 2460 </span> : : size_type</a>
|
||
|
<a name="2461"><span class="lineNum"> 2461 </span> : : rfind(const _CharT* __s, size_type __pos, size_type __n) const</a>
|
||
|
<a name="2462"><span class="lineNum"> 2462 </span> : : _GLIBCXX_NOEXCEPT;</a>
|
||
|
<a name="2463"><span class="lineNum"> 2463 </span> : : </a>
|
||
|
<a name="2464"><span class="lineNum"> 2464 </span> : : /**</a>
|
||
|
<a name="2465"><span class="lineNum"> 2465 </span> : : * @brief Find last position of a C string.</a>
|
||
|
<a name="2466"><span class="lineNum"> 2466 </span> : : * @param __s C string to locate.</a>
|
||
|
<a name="2467"><span class="lineNum"> 2467 </span> : : * @param __pos Index of character to start search at (default end).</a>
|
||
|
<a name="2468"><span class="lineNum"> 2468 </span> : : * @return Index of start of last occurrence.</a>
|
||
|
<a name="2469"><span class="lineNum"> 2469 </span> : : *</a>
|
||
|
<a name="2470"><span class="lineNum"> 2470 </span> : : * Starting from @a __pos, searches backward for the value of</a>
|
||
|
<a name="2471"><span class="lineNum"> 2471 </span> : : * @a __s within this string. If found, returns the index</a>
|
||
|
<a name="2472"><span class="lineNum"> 2472 </span> : : * where it begins. If not found, returns npos.</a>
|
||
|
<a name="2473"><span class="lineNum"> 2473 </span> : : */</a>
|
||
|
<a name="2474"><span class="lineNum"> 2474 </span> : : size_type</a>
|
||
|
<a name="2475"><span class="lineNum"> 2475 </span> : : rfind(const _CharT* __s, size_type __pos = npos) const</a>
|
||
|
<a name="2476"><span class="lineNum"> 2476 </span> : : {</a>
|
||
|
<a name="2477"><span class="lineNum"> 2477 </span> : : __glibcxx_requires_string(__s);</a>
|
||
|
<a name="2478"><span class="lineNum"> 2478 </span> : : return this->rfind(__s, __pos, traits_type::length(__s));</a>
|
||
|
<a name="2479"><span class="lineNum"> 2479 </span> : : }</a>
|
||
|
<a name="2480"><span class="lineNum"> 2480 </span> : : </a>
|
||
|
<a name="2481"><span class="lineNum"> 2481 </span> : : /**</a>
|
||
|
<a name="2482"><span class="lineNum"> 2482 </span> : : * @brief Find last position of a character.</a>
|
||
|
<a name="2483"><span class="lineNum"> 2483 </span> : : * @param __c Character to locate.</a>
|
||
|
<a name="2484"><span class="lineNum"> 2484 </span> : : * @param __pos Index of character to search back from (default end).</a>
|
||
|
<a name="2485"><span class="lineNum"> 2485 </span> : : * @return Index of last occurrence.</a>
|
||
|
<a name="2486"><span class="lineNum"> 2486 </span> : : *</a>
|
||
|
<a name="2487"><span class="lineNum"> 2487 </span> : : * Starting from @a __pos, searches backward for @a __c within</a>
|
||
|
<a name="2488"><span class="lineNum"> 2488 </span> : : * this string. If found, returns the index where it was</a>
|
||
|
<a name="2489"><span class="lineNum"> 2489 </span> : : * found. If not found, returns npos.</a>
|
||
|
<a name="2490"><span class="lineNum"> 2490 </span> : : */</a>
|
||
|
<a name="2491"><span class="lineNum"> 2491 </span> : : size_type</a>
|
||
|
<a name="2492"><span class="lineNum"> 2492 </span> : : rfind(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT;</a>
|
||
|
<a name="2493"><span class="lineNum"> 2493 </span> : : </a>
|
||
|
<a name="2494"><span class="lineNum"> 2494 </span> : : /**</a>
|
||
|
<a name="2495"><span class="lineNum"> 2495 </span> : : * @brief Find position of a character of string.</a>
|
||
|
<a name="2496"><span class="lineNum"> 2496 </span> : : * @param __str String containing characters to locate.</a>
|
||
|
<a name="2497"><span class="lineNum"> 2497 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="2498"><span class="lineNum"> 2498 </span> : : * @return Index of first occurrence.</a>
|
||
|
<a name="2499"><span class="lineNum"> 2499 </span> : : *</a>
|
||
|
<a name="2500"><span class="lineNum"> 2500 </span> : : * Starting from @a __pos, searches forward for one of the</a>
|
||
|
<a name="2501"><span class="lineNum"> 2501 </span> : : * characters of @a __str within this string. If found,</a>
|
||
|
<a name="2502"><span class="lineNum"> 2502 </span> : : * returns the index where it was found. If not found, returns</a>
|
||
|
<a name="2503"><span class="lineNum"> 2503 </span> : : * npos.</a>
|
||
|
<a name="2504"><span class="lineNum"> 2504 </span> : : */</a>
|
||
|
<a name="2505"><span class="lineNum"> 2505 </span> : : size_type</a>
|
||
|
<a name="2506"><span class="lineNum"> 2506 </span> : : find_first_of(const basic_string& __str, size_type __pos = 0) const</a>
|
||
|
<a name="2507"><span class="lineNum"> 2507 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="2508"><span class="lineNum"> 2508 </span> : : { return this->find_first_of(__str.data(), __pos, __str.size()); }</a>
|
||
|
<a name="2509"><span class="lineNum"> 2509 </span> : : </a>
|
||
|
<a name="2510"><span class="lineNum"> 2510 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="2511"><span class="lineNum"> 2511 </span> : : /**</a>
|
||
|
<a name="2512"><span class="lineNum"> 2512 </span> : : * @brief Find position of a character of a string_view.</a>
|
||
|
<a name="2513"><span class="lineNum"> 2513 </span> : : * @param __svt An object convertible to string_view containing</a>
|
||
|
<a name="2514"><span class="lineNum"> 2514 </span> : : * characters to locate.</a>
|
||
|
<a name="2515"><span class="lineNum"> 2515 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="2516"><span class="lineNum"> 2516 </span> : : * @return Index of first occurrence.</a>
|
||
|
<a name="2517"><span class="lineNum"> 2517 </span> : : */</a>
|
||
|
<a name="2518"><span class="lineNum"> 2518 </span> : : template<typename _Tp></a>
|
||
|
<a name="2519"><span class="lineNum"> 2519 </span> : : _If_sv<_Tp, size_type></a>
|
||
|
<a name="2520"><span class="lineNum"> 2520 </span> : : find_first_of(const _Tp& __svt, size_type __pos = 0) const</a>
|
||
|
<a name="2521"><span class="lineNum"> 2521 </span> : : noexcept(is_same<_Tp, __sv_type>::value)</a>
|
||
|
<a name="2522"><span class="lineNum"> 2522 </span> : : {</a>
|
||
|
<a name="2523"><span class="lineNum"> 2523 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="2524"><span class="lineNum"> 2524 </span> : : return this->find_first_of(__sv.data(), __pos, __sv.size());</a>
|
||
|
<a name="2525"><span class="lineNum"> 2525 </span> : : }</a>
|
||
|
<a name="2526"><span class="lineNum"> 2526 </span> : : #endif // C++17</a>
|
||
|
<a name="2527"><span class="lineNum"> 2527 </span> : : </a>
|
||
|
<a name="2528"><span class="lineNum"> 2528 </span> : : /**</a>
|
||
|
<a name="2529"><span class="lineNum"> 2529 </span> : : * @brief Find position of a character of C substring.</a>
|
||
|
<a name="2530"><span class="lineNum"> 2530 </span> : : * @param __s String containing characters to locate.</a>
|
||
|
<a name="2531"><span class="lineNum"> 2531 </span> : : * @param __pos Index of character to search from.</a>
|
||
|
<a name="2532"><span class="lineNum"> 2532 </span> : : * @param __n Number of characters from s to search for.</a>
|
||
|
<a name="2533"><span class="lineNum"> 2533 </span> : : * @return Index of first occurrence.</a>
|
||
|
<a name="2534"><span class="lineNum"> 2534 </span> : : *</a>
|
||
|
<a name="2535"><span class="lineNum"> 2535 </span> : : * Starting from @a __pos, searches forward for one of the</a>
|
||
|
<a name="2536"><span class="lineNum"> 2536 </span> : : * first @a __n characters of @a __s within this string. If</a>
|
||
|
<a name="2537"><span class="lineNum"> 2537 </span> : : * found, returns the index where it was found. If not found,</a>
|
||
|
<a name="2538"><span class="lineNum"> 2538 </span> : : * returns npos.</a>
|
||
|
<a name="2539"><span class="lineNum"> 2539 </span> : : */</a>
|
||
|
<a name="2540"><span class="lineNum"> 2540 </span> : : size_type</a>
|
||
|
<a name="2541"><span class="lineNum"> 2541 </span> : : find_first_of(const _CharT* __s, size_type __pos, size_type __n) const</a>
|
||
|
<a name="2542"><span class="lineNum"> 2542 </span> : : _GLIBCXX_NOEXCEPT;</a>
|
||
|
<a name="2543"><span class="lineNum"> 2543 </span> : : </a>
|
||
|
<a name="2544"><span class="lineNum"> 2544 </span> : : /**</a>
|
||
|
<a name="2545"><span class="lineNum"> 2545 </span> : : * @brief Find position of a character of C string.</a>
|
||
|
<a name="2546"><span class="lineNum"> 2546 </span> : : * @param __s String containing characters to locate.</a>
|
||
|
<a name="2547"><span class="lineNum"> 2547 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="2548"><span class="lineNum"> 2548 </span> : : * @return Index of first occurrence.</a>
|
||
|
<a name="2549"><span class="lineNum"> 2549 </span> : : *</a>
|
||
|
<a name="2550"><span class="lineNum"> 2550 </span> : : * Starting from @a __pos, searches forward for one of the</a>
|
||
|
<a name="2551"><span class="lineNum"> 2551 </span> : : * characters of @a __s within this string. If found, returns</a>
|
||
|
<a name="2552"><span class="lineNum"> 2552 </span> : : * the index where it was found. If not found, returns npos.</a>
|
||
|
<a name="2553"><span class="lineNum"> 2553 </span> : : */</a>
|
||
|
<a name="2554"><span class="lineNum"> 2554 </span> : : size_type</a>
|
||
|
<a name="2555"><span class="lineNum"> 2555 </span> : : find_first_of(const _CharT* __s, size_type __pos = 0) const</a>
|
||
|
<a name="2556"><span class="lineNum"> 2556 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="2557"><span class="lineNum"> 2557 </span> : : {</a>
|
||
|
<a name="2558"><span class="lineNum"> 2558 </span> : : __glibcxx_requires_string(__s);</a>
|
||
|
<a name="2559"><span class="lineNum"> 2559 </span> : : return this->find_first_of(__s, __pos, traits_type::length(__s));</a>
|
||
|
<a name="2560"><span class="lineNum"> 2560 </span> : : }</a>
|
||
|
<a name="2561"><span class="lineNum"> 2561 </span> : : </a>
|
||
|
<a name="2562"><span class="lineNum"> 2562 </span> : : /**</a>
|
||
|
<a name="2563"><span class="lineNum"> 2563 </span> : : * @brief Find position of a character.</a>
|
||
|
<a name="2564"><span class="lineNum"> 2564 </span> : : * @param __c Character to locate.</a>
|
||
|
<a name="2565"><span class="lineNum"> 2565 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="2566"><span class="lineNum"> 2566 </span> : : * @return Index of first occurrence.</a>
|
||
|
<a name="2567"><span class="lineNum"> 2567 </span> : : *</a>
|
||
|
<a name="2568"><span class="lineNum"> 2568 </span> : : * Starting from @a __pos, searches forward for the character</a>
|
||
|
<a name="2569"><span class="lineNum"> 2569 </span> : : * @a __c within this string. If found, returns the index</a>
|
||
|
<a name="2570"><span class="lineNum"> 2570 </span> : : * where it was found. If not found, returns npos.</a>
|
||
|
<a name="2571"><span class="lineNum"> 2571 </span> : : *</a>
|
||
|
<a name="2572"><span class="lineNum"> 2572 </span> : : * Note: equivalent to find(__c, __pos).</a>
|
||
|
<a name="2573"><span class="lineNum"> 2573 </span> : : */</a>
|
||
|
<a name="2574"><span class="lineNum"> 2574 </span> : : size_type</a>
|
||
|
<a name="2575"><span class="lineNum"> 2575 </span> : : find_first_of(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="2576"><span class="lineNum"> 2576 </span> : : { return this->find(__c, __pos); }</a>
|
||
|
<a name="2577"><span class="lineNum"> 2577 </span> : : </a>
|
||
|
<a name="2578"><span class="lineNum"> 2578 </span> : : /**</a>
|
||
|
<a name="2579"><span class="lineNum"> 2579 </span> : : * @brief Find last position of a character of string.</a>
|
||
|
<a name="2580"><span class="lineNum"> 2580 </span> : : * @param __str String containing characters to locate.</a>
|
||
|
<a name="2581"><span class="lineNum"> 2581 </span> : : * @param __pos Index of character to search back from (default end).</a>
|
||
|
<a name="2582"><span class="lineNum"> 2582 </span> : : * @return Index of last occurrence.</a>
|
||
|
<a name="2583"><span class="lineNum"> 2583 </span> : : *</a>
|
||
|
<a name="2584"><span class="lineNum"> 2584 </span> : : * Starting from @a __pos, searches backward for one of the</a>
|
||
|
<a name="2585"><span class="lineNum"> 2585 </span> : : * characters of @a __str within this string. If found,</a>
|
||
|
<a name="2586"><span class="lineNum"> 2586 </span> : : * returns the index where it was found. If not found, returns</a>
|
||
|
<a name="2587"><span class="lineNum"> 2587 </span> : : * npos.</a>
|
||
|
<a name="2588"><span class="lineNum"> 2588 </span> : : */</a>
|
||
|
<a name="2589"><span class="lineNum"> 2589 </span> : : size_type</a>
|
||
|
<a name="2590"><span class="lineNum"> 2590 </span> : : find_last_of(const basic_string& __str, size_type __pos = npos) const</a>
|
||
|
<a name="2591"><span class="lineNum"> 2591 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="2592"><span class="lineNum"> 2592 </span> : : { return this->find_last_of(__str.data(), __pos, __str.size()); }</a>
|
||
|
<a name="2593"><span class="lineNum"> 2593 </span> : : </a>
|
||
|
<a name="2594"><span class="lineNum"> 2594 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="2595"><span class="lineNum"> 2595 </span> : : /**</a>
|
||
|
<a name="2596"><span class="lineNum"> 2596 </span> : : * @brief Find last position of a character of string.</a>
|
||
|
<a name="2597"><span class="lineNum"> 2597 </span> : : * @param __svt An object convertible to string_view containing</a>
|
||
|
<a name="2598"><span class="lineNum"> 2598 </span> : : * characters to locate.</a>
|
||
|
<a name="2599"><span class="lineNum"> 2599 </span> : : * @param __pos Index of character to search back from (default end).</a>
|
||
|
<a name="2600"><span class="lineNum"> 2600 </span> : : * @return Index of last occurrence.</a>
|
||
|
<a name="2601"><span class="lineNum"> 2601 </span> : : */</a>
|
||
|
<a name="2602"><span class="lineNum"> 2602 </span> : : template<typename _Tp></a>
|
||
|
<a name="2603"><span class="lineNum"> 2603 </span> : : _If_sv<_Tp, size_type></a>
|
||
|
<a name="2604"><span class="lineNum"> 2604 </span> : : find_last_of(const _Tp& __svt, size_type __pos = npos) const</a>
|
||
|
<a name="2605"><span class="lineNum"> 2605 </span> : : noexcept(is_same<_Tp, __sv_type>::value)</a>
|
||
|
<a name="2606"><span class="lineNum"> 2606 </span> : : {</a>
|
||
|
<a name="2607"><span class="lineNum"> 2607 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="2608"><span class="lineNum"> 2608 </span> : : return this->find_last_of(__sv.data(), __pos, __sv.size());</a>
|
||
|
<a name="2609"><span class="lineNum"> 2609 </span> : : }</a>
|
||
|
<a name="2610"><span class="lineNum"> 2610 </span> : : #endif // C++17</a>
|
||
|
<a name="2611"><span class="lineNum"> 2611 </span> : : </a>
|
||
|
<a name="2612"><span class="lineNum"> 2612 </span> : : /**</a>
|
||
|
<a name="2613"><span class="lineNum"> 2613 </span> : : * @brief Find last position of a character of C substring.</a>
|
||
|
<a name="2614"><span class="lineNum"> 2614 </span> : : * @param __s C string containing characters to locate.</a>
|
||
|
<a name="2615"><span class="lineNum"> 2615 </span> : : * @param __pos Index of character to search back from.</a>
|
||
|
<a name="2616"><span class="lineNum"> 2616 </span> : : * @param __n Number of characters from s to search for.</a>
|
||
|
<a name="2617"><span class="lineNum"> 2617 </span> : : * @return Index of last occurrence.</a>
|
||
|
<a name="2618"><span class="lineNum"> 2618 </span> : : *</a>
|
||
|
<a name="2619"><span class="lineNum"> 2619 </span> : : * Starting from @a __pos, searches backward for one of the</a>
|
||
|
<a name="2620"><span class="lineNum"> 2620 </span> : : * first @a __n characters of @a __s within this string. If</a>
|
||
|
<a name="2621"><span class="lineNum"> 2621 </span> : : * found, returns the index where it was found. If not found,</a>
|
||
|
<a name="2622"><span class="lineNum"> 2622 </span> : : * returns npos.</a>
|
||
|
<a name="2623"><span class="lineNum"> 2623 </span> : : */</a>
|
||
|
<a name="2624"><span class="lineNum"> 2624 </span> : : size_type</a>
|
||
|
<a name="2625"><span class="lineNum"> 2625 </span> : : find_last_of(const _CharT* __s, size_type __pos, size_type __n) const</a>
|
||
|
<a name="2626"><span class="lineNum"> 2626 </span> : : _GLIBCXX_NOEXCEPT;</a>
|
||
|
<a name="2627"><span class="lineNum"> 2627 </span> : : </a>
|
||
|
<a name="2628"><span class="lineNum"> 2628 </span> : : /**</a>
|
||
|
<a name="2629"><span class="lineNum"> 2629 </span> : : * @brief Find last position of a character of C string.</a>
|
||
|
<a name="2630"><span class="lineNum"> 2630 </span> : : * @param __s C string containing characters to locate.</a>
|
||
|
<a name="2631"><span class="lineNum"> 2631 </span> : : * @param __pos Index of character to search back from (default end).</a>
|
||
|
<a name="2632"><span class="lineNum"> 2632 </span> : : * @return Index of last occurrence.</a>
|
||
|
<a name="2633"><span class="lineNum"> 2633 </span> : : *</a>
|
||
|
<a name="2634"><span class="lineNum"> 2634 </span> : : * Starting from @a __pos, searches backward for one of the</a>
|
||
|
<a name="2635"><span class="lineNum"> 2635 </span> : : * characters of @a __s within this string. If found, returns</a>
|
||
|
<a name="2636"><span class="lineNum"> 2636 </span> : : * the index where it was found. If not found, returns npos.</a>
|
||
|
<a name="2637"><span class="lineNum"> 2637 </span> : : */</a>
|
||
|
<a name="2638"><span class="lineNum"> 2638 </span> : : size_type</a>
|
||
|
<a name="2639"><span class="lineNum"> 2639 </span> : : find_last_of(const _CharT* __s, size_type __pos = npos) const</a>
|
||
|
<a name="2640"><span class="lineNum"> 2640 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="2641"><span class="lineNum"> 2641 </span> : : {</a>
|
||
|
<a name="2642"><span class="lineNum"> 2642 </span> : : __glibcxx_requires_string(__s);</a>
|
||
|
<a name="2643"><span class="lineNum"> 2643 </span> : : return this->find_last_of(__s, __pos, traits_type::length(__s));</a>
|
||
|
<a name="2644"><span class="lineNum"> 2644 </span> : : }</a>
|
||
|
<a name="2645"><span class="lineNum"> 2645 </span> : : </a>
|
||
|
<a name="2646"><span class="lineNum"> 2646 </span> : : /**</a>
|
||
|
<a name="2647"><span class="lineNum"> 2647 </span> : : * @brief Find last position of a character.</a>
|
||
|
<a name="2648"><span class="lineNum"> 2648 </span> : : * @param __c Character to locate.</a>
|
||
|
<a name="2649"><span class="lineNum"> 2649 </span> : : * @param __pos Index of character to search back from (default end).</a>
|
||
|
<a name="2650"><span class="lineNum"> 2650 </span> : : * @return Index of last occurrence.</a>
|
||
|
<a name="2651"><span class="lineNum"> 2651 </span> : : *</a>
|
||
|
<a name="2652"><span class="lineNum"> 2652 </span> : : * Starting from @a __pos, searches backward for @a __c within</a>
|
||
|
<a name="2653"><span class="lineNum"> 2653 </span> : : * this string. If found, returns the index where it was</a>
|
||
|
<a name="2654"><span class="lineNum"> 2654 </span> : : * found. If not found, returns npos.</a>
|
||
|
<a name="2655"><span class="lineNum"> 2655 </span> : : *</a>
|
||
|
<a name="2656"><span class="lineNum"> 2656 </span> : : * Note: equivalent to rfind(__c, __pos).</a>
|
||
|
<a name="2657"><span class="lineNum"> 2657 </span> : : */</a>
|
||
|
<a name="2658"><span class="lineNum"> 2658 </span> : : size_type</a>
|
||
|
<a name="2659"><span class="lineNum"> 2659 </span> : : find_last_of(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="2660"><span class="lineNum"> 2660 </span> : : { return this->rfind(__c, __pos); }</a>
|
||
|
<a name="2661"><span class="lineNum"> 2661 </span> : : </a>
|
||
|
<a name="2662"><span class="lineNum"> 2662 </span> : : /**</a>
|
||
|
<a name="2663"><span class="lineNum"> 2663 </span> : : * @brief Find position of a character not in string.</a>
|
||
|
<a name="2664"><span class="lineNum"> 2664 </span> : : * @param __str String containing characters to avoid.</a>
|
||
|
<a name="2665"><span class="lineNum"> 2665 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="2666"><span class="lineNum"> 2666 </span> : : * @return Index of first occurrence.</a>
|
||
|
<a name="2667"><span class="lineNum"> 2667 </span> : : *</a>
|
||
|
<a name="2668"><span class="lineNum"> 2668 </span> : : * Starting from @a __pos, searches forward for a character not contained</a>
|
||
|
<a name="2669"><span class="lineNum"> 2669 </span> : : * in @a __str within this string. If found, returns the index where it</a>
|
||
|
<a name="2670"><span class="lineNum"> 2670 </span> : : * was found. If not found, returns npos.</a>
|
||
|
<a name="2671"><span class="lineNum"> 2671 </span> : : */</a>
|
||
|
<a name="2672"><span class="lineNum"> 2672 </span> : : size_type</a>
|
||
|
<a name="2673"><span class="lineNum"> 2673 </span> : : find_first_not_of(const basic_string& __str, size_type __pos = 0) const</a>
|
||
|
<a name="2674"><span class="lineNum"> 2674 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="2675"><span class="lineNum"> 2675 </span> : : { return this->find_first_not_of(__str.data(), __pos, __str.size()); }</a>
|
||
|
<a name="2676"><span class="lineNum"> 2676 </span> : : </a>
|
||
|
<a name="2677"><span class="lineNum"> 2677 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="2678"><span class="lineNum"> 2678 </span> : : /**</a>
|
||
|
<a name="2679"><span class="lineNum"> 2679 </span> : : * @brief Find position of a character not in a string_view.</a>
|
||
|
<a name="2680"><span class="lineNum"> 2680 </span> : : * @param __svt A object convertible to string_view containing</a>
|
||
|
<a name="2681"><span class="lineNum"> 2681 </span> : : * characters to avoid.</a>
|
||
|
<a name="2682"><span class="lineNum"> 2682 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="2683"><span class="lineNum"> 2683 </span> : : * @return Index of first occurrence.</a>
|
||
|
<a name="2684"><span class="lineNum"> 2684 </span> : : */</a>
|
||
|
<a name="2685"><span class="lineNum"> 2685 </span> : : template<typename _Tp></a>
|
||
|
<a name="2686"><span class="lineNum"> 2686 </span> : : _If_sv<_Tp, size_type></a>
|
||
|
<a name="2687"><span class="lineNum"> 2687 </span> : : find_first_not_of(const _Tp& __svt, size_type __pos = 0) const</a>
|
||
|
<a name="2688"><span class="lineNum"> 2688 </span> : : noexcept(is_same<_Tp, __sv_type>::value)</a>
|
||
|
<a name="2689"><span class="lineNum"> 2689 </span> : : {</a>
|
||
|
<a name="2690"><span class="lineNum"> 2690 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="2691"><span class="lineNum"> 2691 </span> : : return this->find_first_not_of(__sv.data(), __pos, __sv.size());</a>
|
||
|
<a name="2692"><span class="lineNum"> 2692 </span> : : }</a>
|
||
|
<a name="2693"><span class="lineNum"> 2693 </span> : : #endif // C++17</a>
|
||
|
<a name="2694"><span class="lineNum"> 2694 </span> : : </a>
|
||
|
<a name="2695"><span class="lineNum"> 2695 </span> : : /**</a>
|
||
|
<a name="2696"><span class="lineNum"> 2696 </span> : : * @brief Find position of a character not in C substring.</a>
|
||
|
<a name="2697"><span class="lineNum"> 2697 </span> : : * @param __s C string containing characters to avoid.</a>
|
||
|
<a name="2698"><span class="lineNum"> 2698 </span> : : * @param __pos Index of character to search from.</a>
|
||
|
<a name="2699"><span class="lineNum"> 2699 </span> : : * @param __n Number of characters from __s to consider.</a>
|
||
|
<a name="2700"><span class="lineNum"> 2700 </span> : : * @return Index of first occurrence.</a>
|
||
|
<a name="2701"><span class="lineNum"> 2701 </span> : : *</a>
|
||
|
<a name="2702"><span class="lineNum"> 2702 </span> : : * Starting from @a __pos, searches forward for a character not</a>
|
||
|
<a name="2703"><span class="lineNum"> 2703 </span> : : * contained in the first @a __n characters of @a __s within</a>
|
||
|
<a name="2704"><span class="lineNum"> 2704 </span> : : * this string. If found, returns the index where it was</a>
|
||
|
<a name="2705"><span class="lineNum"> 2705 </span> : : * found. If not found, returns npos.</a>
|
||
|
<a name="2706"><span class="lineNum"> 2706 </span> : : */</a>
|
||
|
<a name="2707"><span class="lineNum"> 2707 </span> : : size_type</a>
|
||
|
<a name="2708"><span class="lineNum"> 2708 </span> : : find_first_not_of(const _CharT* __s, size_type __pos,</a>
|
||
|
<a name="2709"><span class="lineNum"> 2709 </span> : : size_type __n) const _GLIBCXX_NOEXCEPT;</a>
|
||
|
<a name="2710"><span class="lineNum"> 2710 </span> : : </a>
|
||
|
<a name="2711"><span class="lineNum"> 2711 </span> : : /**</a>
|
||
|
<a name="2712"><span class="lineNum"> 2712 </span> : : * @brief Find position of a character not in C string.</a>
|
||
|
<a name="2713"><span class="lineNum"> 2713 </span> : : * @param __s C string containing characters to avoid.</a>
|
||
|
<a name="2714"><span class="lineNum"> 2714 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="2715"><span class="lineNum"> 2715 </span> : : * @return Index of first occurrence.</a>
|
||
|
<a name="2716"><span class="lineNum"> 2716 </span> : : *</a>
|
||
|
<a name="2717"><span class="lineNum"> 2717 </span> : : * Starting from @a __pos, searches forward for a character not</a>
|
||
|
<a name="2718"><span class="lineNum"> 2718 </span> : : * contained in @a __s within this string. If found, returns</a>
|
||
|
<a name="2719"><span class="lineNum"> 2719 </span> : : * the index where it was found. If not found, returns npos.</a>
|
||
|
<a name="2720"><span class="lineNum"> 2720 </span> : : */</a>
|
||
|
<a name="2721"><span class="lineNum"> 2721 </span> : : size_type</a>
|
||
|
<a name="2722"><span class="lineNum"> 2722 </span> : : find_first_not_of(const _CharT* __s, size_type __pos = 0) const</a>
|
||
|
<a name="2723"><span class="lineNum"> 2723 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="2724"><span class="lineNum"> 2724 </span> : : {</a>
|
||
|
<a name="2725"><span class="lineNum"> 2725 </span> : : __glibcxx_requires_string(__s);</a>
|
||
|
<a name="2726"><span class="lineNum"> 2726 </span> : : return this->find_first_not_of(__s, __pos, traits_type::length(__s));</a>
|
||
|
<a name="2727"><span class="lineNum"> 2727 </span> : : }</a>
|
||
|
<a name="2728"><span class="lineNum"> 2728 </span> : : </a>
|
||
|
<a name="2729"><span class="lineNum"> 2729 </span> : : /**</a>
|
||
|
<a name="2730"><span class="lineNum"> 2730 </span> : : * @brief Find position of a different character.</a>
|
||
|
<a name="2731"><span class="lineNum"> 2731 </span> : : * @param __c Character to avoid.</a>
|
||
|
<a name="2732"><span class="lineNum"> 2732 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="2733"><span class="lineNum"> 2733 </span> : : * @return Index of first occurrence.</a>
|
||
|
<a name="2734"><span class="lineNum"> 2734 </span> : : *</a>
|
||
|
<a name="2735"><span class="lineNum"> 2735 </span> : : * Starting from @a __pos, searches forward for a character</a>
|
||
|
<a name="2736"><span class="lineNum"> 2736 </span> : : * other than @a __c within this string. If found, returns the</a>
|
||
|
<a name="2737"><span class="lineNum"> 2737 </span> : : * index where it was found. If not found, returns npos.</a>
|
||
|
<a name="2738"><span class="lineNum"> 2738 </span> : : */</a>
|
||
|
<a name="2739"><span class="lineNum"> 2739 </span> : : size_type</a>
|
||
|
<a name="2740"><span class="lineNum"> 2740 </span> : : find_first_not_of(_CharT __c, size_type __pos = 0) const</a>
|
||
|
<a name="2741"><span class="lineNum"> 2741 </span> : : _GLIBCXX_NOEXCEPT;</a>
|
||
|
<a name="2742"><span class="lineNum"> 2742 </span> : : </a>
|
||
|
<a name="2743"><span class="lineNum"> 2743 </span> : : /**</a>
|
||
|
<a name="2744"><span class="lineNum"> 2744 </span> : : * @brief Find last position of a character not in string.</a>
|
||
|
<a name="2745"><span class="lineNum"> 2745 </span> : : * @param __str String containing characters to avoid.</a>
|
||
|
<a name="2746"><span class="lineNum"> 2746 </span> : : * @param __pos Index of character to search back from (default end).</a>
|
||
|
<a name="2747"><span class="lineNum"> 2747 </span> : : * @return Index of last occurrence.</a>
|
||
|
<a name="2748"><span class="lineNum"> 2748 </span> : : *</a>
|
||
|
<a name="2749"><span class="lineNum"> 2749 </span> : : * Starting from @a __pos, searches backward for a character</a>
|
||
|
<a name="2750"><span class="lineNum"> 2750 </span> : : * not contained in @a __str within this string. If found,</a>
|
||
|
<a name="2751"><span class="lineNum"> 2751 </span> : : * returns the index where it was found. If not found, returns</a>
|
||
|
<a name="2752"><span class="lineNum"> 2752 </span> : : * npos.</a>
|
||
|
<a name="2753"><span class="lineNum"> 2753 </span> : : */</a>
|
||
|
<a name="2754"><span class="lineNum"> 2754 </span> : : size_type</a>
|
||
|
<a name="2755"><span class="lineNum"> 2755 </span> : : find_last_not_of(const basic_string& __str, size_type __pos = npos) const</a>
|
||
|
<a name="2756"><span class="lineNum"> 2756 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="2757"><span class="lineNum"> 2757 </span> : : { return this->find_last_not_of(__str.data(), __pos, __str.size()); }</a>
|
||
|
<a name="2758"><span class="lineNum"> 2758 </span> : : </a>
|
||
|
<a name="2759"><span class="lineNum"> 2759 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="2760"><span class="lineNum"> 2760 </span> : : /**</a>
|
||
|
<a name="2761"><span class="lineNum"> 2761 </span> : : * @brief Find last position of a character not in a string_view.</a>
|
||
|
<a name="2762"><span class="lineNum"> 2762 </span> : : * @param __svt An object convertible to string_view containing</a>
|
||
|
<a name="2763"><span class="lineNum"> 2763 </span> : : * characters to avoid.</a>
|
||
|
<a name="2764"><span class="lineNum"> 2764 </span> : : * @param __pos Index of character to search back from (default end).</a>
|
||
|
<a name="2765"><span class="lineNum"> 2765 </span> : : * @return Index of last occurrence.</a>
|
||
|
<a name="2766"><span class="lineNum"> 2766 </span> : : */</a>
|
||
|
<a name="2767"><span class="lineNum"> 2767 </span> : : template<typename _Tp></a>
|
||
|
<a name="2768"><span class="lineNum"> 2768 </span> : : _If_sv<_Tp, size_type></a>
|
||
|
<a name="2769"><span class="lineNum"> 2769 </span> : : find_last_not_of(const _Tp& __svt, size_type __pos = npos) const</a>
|
||
|
<a name="2770"><span class="lineNum"> 2770 </span> : : noexcept(is_same<_Tp, __sv_type>::value)</a>
|
||
|
<a name="2771"><span class="lineNum"> 2771 </span> : : {</a>
|
||
|
<a name="2772"><span class="lineNum"> 2772 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="2773"><span class="lineNum"> 2773 </span> : : return this->find_last_not_of(__sv.data(), __pos, __sv.size());</a>
|
||
|
<a name="2774"><span class="lineNum"> 2774 </span> : : }</a>
|
||
|
<a name="2775"><span class="lineNum"> 2775 </span> : : #endif // C++17</a>
|
||
|
<a name="2776"><span class="lineNum"> 2776 </span> : : </a>
|
||
|
<a name="2777"><span class="lineNum"> 2777 </span> : : /**</a>
|
||
|
<a name="2778"><span class="lineNum"> 2778 </span> : : * @brief Find last position of a character not in C substring.</a>
|
||
|
<a name="2779"><span class="lineNum"> 2779 </span> : : * @param __s C string containing characters to avoid.</a>
|
||
|
<a name="2780"><span class="lineNum"> 2780 </span> : : * @param __pos Index of character to search back from.</a>
|
||
|
<a name="2781"><span class="lineNum"> 2781 </span> : : * @param __n Number of characters from s to consider.</a>
|
||
|
<a name="2782"><span class="lineNum"> 2782 </span> : : * @return Index of last occurrence.</a>
|
||
|
<a name="2783"><span class="lineNum"> 2783 </span> : : *</a>
|
||
|
<a name="2784"><span class="lineNum"> 2784 </span> : : * Starting from @a __pos, searches backward for a character not</a>
|
||
|
<a name="2785"><span class="lineNum"> 2785 </span> : : * contained in the first @a __n characters of @a __s within this string.</a>
|
||
|
<a name="2786"><span class="lineNum"> 2786 </span> : : * If found, returns the index where it was found. If not found,</a>
|
||
|
<a name="2787"><span class="lineNum"> 2787 </span> : : * returns npos.</a>
|
||
|
<a name="2788"><span class="lineNum"> 2788 </span> : : */</a>
|
||
|
<a name="2789"><span class="lineNum"> 2789 </span> : : size_type</a>
|
||
|
<a name="2790"><span class="lineNum"> 2790 </span> : : find_last_not_of(const _CharT* __s, size_type __pos,</a>
|
||
|
<a name="2791"><span class="lineNum"> 2791 </span> : : size_type __n) const _GLIBCXX_NOEXCEPT;</a>
|
||
|
<a name="2792"><span class="lineNum"> 2792 </span> : : /**</a>
|
||
|
<a name="2793"><span class="lineNum"> 2793 </span> : : * @brief Find last position of a character not in C string.</a>
|
||
|
<a name="2794"><span class="lineNum"> 2794 </span> : : * @param __s C string containing characters to avoid.</a>
|
||
|
<a name="2795"><span class="lineNum"> 2795 </span> : : * @param __pos Index of character to search back from (default end).</a>
|
||
|
<a name="2796"><span class="lineNum"> 2796 </span> : : * @return Index of last occurrence.</a>
|
||
|
<a name="2797"><span class="lineNum"> 2797 </span> : : *</a>
|
||
|
<a name="2798"><span class="lineNum"> 2798 </span> : : * Starting from @a __pos, searches backward for a character</a>
|
||
|
<a name="2799"><span class="lineNum"> 2799 </span> : : * not contained in @a __s within this string. If found,</a>
|
||
|
<a name="2800"><span class="lineNum"> 2800 </span> : : * returns the index where it was found. If not found, returns</a>
|
||
|
<a name="2801"><span class="lineNum"> 2801 </span> : : * npos.</a>
|
||
|
<a name="2802"><span class="lineNum"> 2802 </span> : : */</a>
|
||
|
<a name="2803"><span class="lineNum"> 2803 </span> : : size_type</a>
|
||
|
<a name="2804"><span class="lineNum"> 2804 </span> : : find_last_not_of(const _CharT* __s, size_type __pos = npos) const</a>
|
||
|
<a name="2805"><span class="lineNum"> 2805 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="2806"><span class="lineNum"> 2806 </span> : : {</a>
|
||
|
<a name="2807"><span class="lineNum"> 2807 </span> : : __glibcxx_requires_string(__s);</a>
|
||
|
<a name="2808"><span class="lineNum"> 2808 </span> : : return this->find_last_not_of(__s, __pos, traits_type::length(__s));</a>
|
||
|
<a name="2809"><span class="lineNum"> 2809 </span> : : }</a>
|
||
|
<a name="2810"><span class="lineNum"> 2810 </span> : : </a>
|
||
|
<a name="2811"><span class="lineNum"> 2811 </span> : : /**</a>
|
||
|
<a name="2812"><span class="lineNum"> 2812 </span> : : * @brief Find last position of a different character.</a>
|
||
|
<a name="2813"><span class="lineNum"> 2813 </span> : : * @param __c Character to avoid.</a>
|
||
|
<a name="2814"><span class="lineNum"> 2814 </span> : : * @param __pos Index of character to search back from (default end).</a>
|
||
|
<a name="2815"><span class="lineNum"> 2815 </span> : : * @return Index of last occurrence.</a>
|
||
|
<a name="2816"><span class="lineNum"> 2816 </span> : : *</a>
|
||
|
<a name="2817"><span class="lineNum"> 2817 </span> : : * Starting from @a __pos, searches backward for a character other than</a>
|
||
|
<a name="2818"><span class="lineNum"> 2818 </span> : : * @a __c within this string. If found, returns the index where it was</a>
|
||
|
<a name="2819"><span class="lineNum"> 2819 </span> : : * found. If not found, returns npos.</a>
|
||
|
<a name="2820"><span class="lineNum"> 2820 </span> : : */</a>
|
||
|
<a name="2821"><span class="lineNum"> 2821 </span> : : size_type</a>
|
||
|
<a name="2822"><span class="lineNum"> 2822 </span> : : find_last_not_of(_CharT __c, size_type __pos = npos) const</a>
|
||
|
<a name="2823"><span class="lineNum"> 2823 </span> : : _GLIBCXX_NOEXCEPT;</a>
|
||
|
<a name="2824"><span class="lineNum"> 2824 </span> : : </a>
|
||
|
<a name="2825"><span class="lineNum"> 2825 </span> : : /**</a>
|
||
|
<a name="2826"><span class="lineNum"> 2826 </span> : : * @brief Get a substring.</a>
|
||
|
<a name="2827"><span class="lineNum"> 2827 </span> : : * @param __pos Index of first character (default 0).</a>
|
||
|
<a name="2828"><span class="lineNum"> 2828 </span> : : * @param __n Number of characters in substring (default remainder).</a>
|
||
|
<a name="2829"><span class="lineNum"> 2829 </span> : : * @return The new string.</a>
|
||
|
<a name="2830"><span class="lineNum"> 2830 </span> : : * @throw std::out_of_range If __pos > size().</a>
|
||
|
<a name="2831"><span class="lineNum"> 2831 </span> : : *</a>
|
||
|
<a name="2832"><span class="lineNum"> 2832 </span> : : * Construct and return a new string using the @a __n</a>
|
||
|
<a name="2833"><span class="lineNum"> 2833 </span> : : * characters starting at @a __pos. If the string is too</a>
|
||
|
<a name="2834"><span class="lineNum"> 2834 </span> : : * short, use the remainder of the characters. If @a __pos is</a>
|
||
|
<a name="2835"><span class="lineNum"> 2835 </span> : : * beyond the end of the string, out_of_range is thrown.</a>
|
||
|
<a name="2836"><span class="lineNum"> 2836 </span> : : */</a>
|
||
|
<a name="2837"><span class="lineNum"> 2837 </span> : : basic_string</a>
|
||
|
<a name="2838"><span class="lineNum"> 2838 </span> : : substr(size_type __pos = 0, size_type __n = npos) const</a>
|
||
|
<a name="2839"><span class="lineNum"> 2839 </span> : : { return basic_string(*this,</a>
|
||
|
<a name="2840"><span class="lineNum"> 2840 </span> : : _M_check(__pos, "basic_string::substr"), __n); }</a>
|
||
|
<a name="2841"><span class="lineNum"> 2841 </span> : : </a>
|
||
|
<a name="2842"><span class="lineNum"> 2842 </span> : : /**</a>
|
||
|
<a name="2843"><span class="lineNum"> 2843 </span> : : * @brief Compare to a string.</a>
|
||
|
<a name="2844"><span class="lineNum"> 2844 </span> : : * @param __str String to compare against.</a>
|
||
|
<a name="2845"><span class="lineNum"> 2845 </span> : : * @return Integer < 0, 0, or > 0.</a>
|
||
|
<a name="2846"><span class="lineNum"> 2846 </span> : : *</a>
|
||
|
<a name="2847"><span class="lineNum"> 2847 </span> : : * Returns an integer < 0 if this string is ordered before @a</a>
|
||
|
<a name="2848"><span class="lineNum"> 2848 </span> : : * __str, 0 if their values are equivalent, or > 0 if this</a>
|
||
|
<a name="2849"><span class="lineNum"> 2849 </span> : : * string is ordered after @a __str. Determines the effective</a>
|
||
|
<a name="2850"><span class="lineNum"> 2850 </span> : : * length rlen of the strings to compare as the smallest of</a>
|
||
|
<a name="2851"><span class="lineNum"> 2851 </span> : : * size() and str.size(). The function then compares the two</a>
|
||
|
<a name="2852"><span class="lineNum"> 2852 </span> : : * strings by calling traits::compare(data(), str.data(),rlen).</a>
|
||
|
<a name="2853"><span class="lineNum"> 2853 </span> : : * If the result of the comparison is nonzero returns it,</a>
|
||
|
<a name="2854"><span class="lineNum"> 2854 </span> : : * otherwise the shorter one is ordered first.</a>
|
||
|
<a name="2855"><span class="lineNum"> 2855 </span> : : */</a>
|
||
|
<a name="2856"><span class="lineNum"> 2856 </span> : : int</a>
|
||
|
<a name="2857"><span class="lineNum"> 2857 </span> : : compare(const basic_string& __str) const</a>
|
||
|
<a name="2858"><span class="lineNum"> 2858 </span> : : {</a>
|
||
|
<a name="2859"><span class="lineNum"> 2859 </span> : : const size_type __size = this->size();</a>
|
||
|
<a name="2860"><span class="lineNum"> 2860 </span> : : const size_type __osize = __str.size();</a>
|
||
|
<a name="2861"><span class="lineNum"> 2861 </span> : : const size_type __len = std::min(__size, __osize);</a>
|
||
|
<a name="2862"><span class="lineNum"> 2862 </span> : : </a>
|
||
|
<a name="2863"><span class="lineNum"> 2863 </span> : : int __r = traits_type::compare(_M_data(), __str.data(), __len);</a>
|
||
|
<a name="2864"><span class="lineNum"> 2864 </span> : : if (!__r)</a>
|
||
|
<a name="2865"><span class="lineNum"> 2865 </span> : : __r = _S_compare(__size, __osize);</a>
|
||
|
<a name="2866"><span class="lineNum"> 2866 </span> : : return __r;</a>
|
||
|
<a name="2867"><span class="lineNum"> 2867 </span> : : }</a>
|
||
|
<a name="2868"><span class="lineNum"> 2868 </span> : : </a>
|
||
|
<a name="2869"><span class="lineNum"> 2869 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="2870"><span class="lineNum"> 2870 </span> : : /**</a>
|
||
|
<a name="2871"><span class="lineNum"> 2871 </span> : : * @brief Compare to a string_view.</a>
|
||
|
<a name="2872"><span class="lineNum"> 2872 </span> : : * @param __svt An object convertible to string_view to compare against.</a>
|
||
|
<a name="2873"><span class="lineNum"> 2873 </span> : : * @return Integer < 0, 0, or > 0.</a>
|
||
|
<a name="2874"><span class="lineNum"> 2874 </span> : : */</a>
|
||
|
<a name="2875"><span class="lineNum"> 2875 </span> : : template<typename _Tp></a>
|
||
|
<a name="2876"><span class="lineNum"> 2876 </span> : : _If_sv<_Tp, int></a>
|
||
|
<a name="2877"><span class="lineNum"> 2877 </span> : : compare(const _Tp& __svt) const</a>
|
||
|
<a name="2878"><span class="lineNum"> 2878 </span> : : noexcept(is_same<_Tp, __sv_type>::value)</a>
|
||
|
<a name="2879"><span class="lineNum"> 2879 </span> : : {</a>
|
||
|
<a name="2880"><span class="lineNum"> 2880 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="2881"><span class="lineNum"> 2881 </span> : : const size_type __size = this->size();</a>
|
||
|
<a name="2882"><span class="lineNum"> 2882 </span> : : const size_type __osize = __sv.size();</a>
|
||
|
<a name="2883"><span class="lineNum"> 2883 </span> : : const size_type __len = std::min(__size, __osize);</a>
|
||
|
<a name="2884"><span class="lineNum"> 2884 </span> : : </a>
|
||
|
<a name="2885"><span class="lineNum"> 2885 </span> : : int __r = traits_type::compare(_M_data(), __sv.data(), __len);</a>
|
||
|
<a name="2886"><span class="lineNum"> 2886 </span> : : if (!__r)</a>
|
||
|
<a name="2887"><span class="lineNum"> 2887 </span> : : __r = _S_compare(__size, __osize);</a>
|
||
|
<a name="2888"><span class="lineNum"> 2888 </span> : : return __r;</a>
|
||
|
<a name="2889"><span class="lineNum"> 2889 </span> : : }</a>
|
||
|
<a name="2890"><span class="lineNum"> 2890 </span> : : </a>
|
||
|
<a name="2891"><span class="lineNum"> 2891 </span> : : /**</a>
|
||
|
<a name="2892"><span class="lineNum"> 2892 </span> : : * @brief Compare to a string_view.</a>
|
||
|
<a name="2893"><span class="lineNum"> 2893 </span> : : * @param __pos A position in the string to start comparing from.</a>
|
||
|
<a name="2894"><span class="lineNum"> 2894 </span> : : * @param __n The number of characters to compare.</a>
|
||
|
<a name="2895"><span class="lineNum"> 2895 </span> : : * @param __svt An object convertible to string_view to compare</a>
|
||
|
<a name="2896"><span class="lineNum"> 2896 </span> : : * against.</a>
|
||
|
<a name="2897"><span class="lineNum"> 2897 </span> : : * @return Integer < 0, 0, or > 0.</a>
|
||
|
<a name="2898"><span class="lineNum"> 2898 </span> : : */</a>
|
||
|
<a name="2899"><span class="lineNum"> 2899 </span> : : template<typename _Tp></a>
|
||
|
<a name="2900"><span class="lineNum"> 2900 </span> : : _If_sv<_Tp, int></a>
|
||
|
<a name="2901"><span class="lineNum"> 2901 </span> : : compare(size_type __pos, size_type __n, const _Tp& __svt) const</a>
|
||
|
<a name="2902"><span class="lineNum"> 2902 </span> : : noexcept(is_same<_Tp, __sv_type>::value)</a>
|
||
|
<a name="2903"><span class="lineNum"> 2903 </span> : : {</a>
|
||
|
<a name="2904"><span class="lineNum"> 2904 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="2905"><span class="lineNum"> 2905 </span> : : return __sv_type(*this).substr(__pos, __n).compare(__sv);</a>
|
||
|
<a name="2906"><span class="lineNum"> 2906 </span> : : }</a>
|
||
|
<a name="2907"><span class="lineNum"> 2907 </span> : : </a>
|
||
|
<a name="2908"><span class="lineNum"> 2908 </span> : : /**</a>
|
||
|
<a name="2909"><span class="lineNum"> 2909 </span> : : * @brief Compare to a string_view.</a>
|
||
|
<a name="2910"><span class="lineNum"> 2910 </span> : : * @param __pos1 A position in the string to start comparing from.</a>
|
||
|
<a name="2911"><span class="lineNum"> 2911 </span> : : * @param __n1 The number of characters to compare.</a>
|
||
|
<a name="2912"><span class="lineNum"> 2912 </span> : : * @param __svt An object convertible to string_view to compare</a>
|
||
|
<a name="2913"><span class="lineNum"> 2913 </span> : : * against.</a>
|
||
|
<a name="2914"><span class="lineNum"> 2914 </span> : : * @param __pos2 A position in the string_view to start comparing from.</a>
|
||
|
<a name="2915"><span class="lineNum"> 2915 </span> : : * @param __n2 The number of characters to compare.</a>
|
||
|
<a name="2916"><span class="lineNum"> 2916 </span> : : * @return Integer < 0, 0, or > 0.</a>
|
||
|
<a name="2917"><span class="lineNum"> 2917 </span> : : */</a>
|
||
|
<a name="2918"><span class="lineNum"> 2918 </span> : : template<typename _Tp></a>
|
||
|
<a name="2919"><span class="lineNum"> 2919 </span> : : _If_sv<_Tp, int></a>
|
||
|
<a name="2920"><span class="lineNum"> 2920 </span> : : compare(size_type __pos1, size_type __n1, const _Tp& __svt,</a>
|
||
|
<a name="2921"><span class="lineNum"> 2921 </span> : : size_type __pos2, size_type __n2 = npos) const</a>
|
||
|
<a name="2922"><span class="lineNum"> 2922 </span> : : noexcept(is_same<_Tp, __sv_type>::value)</a>
|
||
|
<a name="2923"><span class="lineNum"> 2923 </span> : : {</a>
|
||
|
<a name="2924"><span class="lineNum"> 2924 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="2925"><span class="lineNum"> 2925 </span> : : return __sv_type(*this)</a>
|
||
|
<a name="2926"><span class="lineNum"> 2926 </span> : : .substr(__pos1, __n1).compare(__sv.substr(__pos2, __n2));</a>
|
||
|
<a name="2927"><span class="lineNum"> 2927 </span> : : }</a>
|
||
|
<a name="2928"><span class="lineNum"> 2928 </span> : : #endif // C++17</a>
|
||
|
<a name="2929"><span class="lineNum"> 2929 </span> : : </a>
|
||
|
<a name="2930"><span class="lineNum"> 2930 </span> : : /**</a>
|
||
|
<a name="2931"><span class="lineNum"> 2931 </span> : : * @brief Compare substring to a string.</a>
|
||
|
<a name="2932"><span class="lineNum"> 2932 </span> : : * @param __pos Index of first character of substring.</a>
|
||
|
<a name="2933"><span class="lineNum"> 2933 </span> : : * @param __n Number of characters in substring.</a>
|
||
|
<a name="2934"><span class="lineNum"> 2934 </span> : : * @param __str String to compare against.</a>
|
||
|
<a name="2935"><span class="lineNum"> 2935 </span> : : * @return Integer < 0, 0, or > 0.</a>
|
||
|
<a name="2936"><span class="lineNum"> 2936 </span> : : *</a>
|
||
|
<a name="2937"><span class="lineNum"> 2937 </span> : : * Form the substring of this string from the @a __n characters</a>
|
||
|
<a name="2938"><span class="lineNum"> 2938 </span> : : * starting at @a __pos. Returns an integer < 0 if the</a>
|
||
|
<a name="2939"><span class="lineNum"> 2939 </span> : : * substring is ordered before @a __str, 0 if their values are</a>
|
||
|
<a name="2940"><span class="lineNum"> 2940 </span> : : * equivalent, or > 0 if the substring is ordered after @a</a>
|
||
|
<a name="2941"><span class="lineNum"> 2941 </span> : : * __str. Determines the effective length rlen of the strings</a>
|
||
|
<a name="2942"><span class="lineNum"> 2942 </span> : : * to compare as the smallest of the length of the substring</a>
|
||
|
<a name="2943"><span class="lineNum"> 2943 </span> : : * and @a __str.size(). The function then compares the two</a>
|
||
|
<a name="2944"><span class="lineNum"> 2944 </span> : : * strings by calling</a>
|
||
|
<a name="2945"><span class="lineNum"> 2945 </span> : : * traits::compare(substring.data(),str.data(),rlen). If the</a>
|
||
|
<a name="2946"><span class="lineNum"> 2946 </span> : : * result of the comparison is nonzero returns it, otherwise</a>
|
||
|
<a name="2947"><span class="lineNum"> 2947 </span> : : * the shorter one is ordered first.</a>
|
||
|
<a name="2948"><span class="lineNum"> 2948 </span> : : */</a>
|
||
|
<a name="2949"><span class="lineNum"> 2949 </span> : : int</a>
|
||
|
<a name="2950"><span class="lineNum"> 2950 </span> : : compare(size_type __pos, size_type __n, const basic_string& __str) const;</a>
|
||
|
<a name="2951"><span class="lineNum"> 2951 </span> : : </a>
|
||
|
<a name="2952"><span class="lineNum"> 2952 </span> : : /**</a>
|
||
|
<a name="2953"><span class="lineNum"> 2953 </span> : : * @brief Compare substring to a substring.</a>
|
||
|
<a name="2954"><span class="lineNum"> 2954 </span> : : * @param __pos1 Index of first character of substring.</a>
|
||
|
<a name="2955"><span class="lineNum"> 2955 </span> : : * @param __n1 Number of characters in substring.</a>
|
||
|
<a name="2956"><span class="lineNum"> 2956 </span> : : * @param __str String to compare against.</a>
|
||
|
<a name="2957"><span class="lineNum"> 2957 </span> : : * @param __pos2 Index of first character of substring of str.</a>
|
||
|
<a name="2958"><span class="lineNum"> 2958 </span> : : * @param __n2 Number of characters in substring of str.</a>
|
||
|
<a name="2959"><span class="lineNum"> 2959 </span> : : * @return Integer < 0, 0, or > 0.</a>
|
||
|
<a name="2960"><span class="lineNum"> 2960 </span> : : *</a>
|
||
|
<a name="2961"><span class="lineNum"> 2961 </span> : : * Form the substring of this string from the @a __n1</a>
|
||
|
<a name="2962"><span class="lineNum"> 2962 </span> : : * characters starting at @a __pos1. Form the substring of @a</a>
|
||
|
<a name="2963"><span class="lineNum"> 2963 </span> : : * __str from the @a __n2 characters starting at @a __pos2.</a>
|
||
|
<a name="2964"><span class="lineNum"> 2964 </span> : : * Returns an integer < 0 if this substring is ordered before</a>
|
||
|
<a name="2965"><span class="lineNum"> 2965 </span> : : * the substring of @a __str, 0 if their values are equivalent,</a>
|
||
|
<a name="2966"><span class="lineNum"> 2966 </span> : : * or > 0 if this substring is ordered after the substring of</a>
|
||
|
<a name="2967"><span class="lineNum"> 2967 </span> : : * @a __str. Determines the effective length rlen of the</a>
|
||
|
<a name="2968"><span class="lineNum"> 2968 </span> : : * strings to compare as the smallest of the lengths of the</a>
|
||
|
<a name="2969"><span class="lineNum"> 2969 </span> : : * substrings. The function then compares the two strings by</a>
|
||
|
<a name="2970"><span class="lineNum"> 2970 </span> : : * calling</a>
|
||
|
<a name="2971"><span class="lineNum"> 2971 </span> : : * traits::compare(substring.data(),str.substr(pos2,n2).data(),rlen).</a>
|
||
|
<a name="2972"><span class="lineNum"> 2972 </span> : : * If the result of the comparison is nonzero returns it,</a>
|
||
|
<a name="2973"><span class="lineNum"> 2973 </span> : : * otherwise the shorter one is ordered first.</a>
|
||
|
<a name="2974"><span class="lineNum"> 2974 </span> : : */</a>
|
||
|
<a name="2975"><span class="lineNum"> 2975 </span> : : int</a>
|
||
|
<a name="2976"><span class="lineNum"> 2976 </span> : : compare(size_type __pos1, size_type __n1, const basic_string& __str,</a>
|
||
|
<a name="2977"><span class="lineNum"> 2977 </span> : : size_type __pos2, size_type __n2 = npos) const;</a>
|
||
|
<a name="2978"><span class="lineNum"> 2978 </span> : : </a>
|
||
|
<a name="2979"><span class="lineNum"> 2979 </span> : : /**</a>
|
||
|
<a name="2980"><span class="lineNum"> 2980 </span> : : * @brief Compare to a C string.</a>
|
||
|
<a name="2981"><span class="lineNum"> 2981 </span> : : * @param __s C string to compare against.</a>
|
||
|
<a name="2982"><span class="lineNum"> 2982 </span> : : * @return Integer < 0, 0, or > 0.</a>
|
||
|
<a name="2983"><span class="lineNum"> 2983 </span> : : *</a>
|
||
|
<a name="2984"><span class="lineNum"> 2984 </span> : : * Returns an integer < 0 if this string is ordered before @a __s, 0 if</a>
|
||
|
<a name="2985"><span class="lineNum"> 2985 </span> : : * their values are equivalent, or > 0 if this string is ordered after</a>
|
||
|
<a name="2986"><span class="lineNum"> 2986 </span> : : * @a __s. Determines the effective length rlen of the strings to</a>
|
||
|
<a name="2987"><span class="lineNum"> 2987 </span> : : * compare as the smallest of size() and the length of a string</a>
|
||
|
<a name="2988"><span class="lineNum"> 2988 </span> : : * constructed from @a __s. The function then compares the two strings</a>
|
||
|
<a name="2989"><span class="lineNum"> 2989 </span> : : * by calling traits::compare(data(),s,rlen). If the result of the</a>
|
||
|
<a name="2990"><span class="lineNum"> 2990 </span> : : * comparison is nonzero returns it, otherwise the shorter one is</a>
|
||
|
<a name="2991"><span class="lineNum"> 2991 </span> : : * ordered first.</a>
|
||
|
<a name="2992"><span class="lineNum"> 2992 </span> : : */</a>
|
||
|
<a name="2993"><span class="lineNum"> 2993 </span> : : int</a>
|
||
|
<a name="2994"><span class="lineNum"> 2994 </span> : : compare(const _CharT* __s) const _GLIBCXX_NOEXCEPT;</a>
|
||
|
<a name="2995"><span class="lineNum"> 2995 </span> : : </a>
|
||
|
<a name="2996"><span class="lineNum"> 2996 </span> : : // _GLIBCXX_RESOLVE_LIB_DEFECTS</a>
|
||
|
<a name="2997"><span class="lineNum"> 2997 </span> : : // 5 String::compare specification questionable</a>
|
||
|
<a name="2998"><span class="lineNum"> 2998 </span> : : /**</a>
|
||
|
<a name="2999"><span class="lineNum"> 2999 </span> : : * @brief Compare substring to a C string.</a>
|
||
|
<a name="3000"><span class="lineNum"> 3000 </span> : : * @param __pos Index of first character of substring.</a>
|
||
|
<a name="3001"><span class="lineNum"> 3001 </span> : : * @param __n1 Number of characters in substring.</a>
|
||
|
<a name="3002"><span class="lineNum"> 3002 </span> : : * @param __s C string to compare against.</a>
|
||
|
<a name="3003"><span class="lineNum"> 3003 </span> : : * @return Integer < 0, 0, or > 0.</a>
|
||
|
<a name="3004"><span class="lineNum"> 3004 </span> : : *</a>
|
||
|
<a name="3005"><span class="lineNum"> 3005 </span> : : * Form the substring of this string from the @a __n1</a>
|
||
|
<a name="3006"><span class="lineNum"> 3006 </span> : : * characters starting at @a pos. Returns an integer < 0 if</a>
|
||
|
<a name="3007"><span class="lineNum"> 3007 </span> : : * the substring is ordered before @a __s, 0 if their values</a>
|
||
|
<a name="3008"><span class="lineNum"> 3008 </span> : : * are equivalent, or > 0 if the substring is ordered after @a</a>
|
||
|
<a name="3009"><span class="lineNum"> 3009 </span> : : * __s. Determines the effective length rlen of the strings to</a>
|
||
|
<a name="3010"><span class="lineNum"> 3010 </span> : : * compare as the smallest of the length of the substring and</a>
|
||
|
<a name="3011"><span class="lineNum"> 3011 </span> : : * the length of a string constructed from @a __s. The</a>
|
||
|
<a name="3012"><span class="lineNum"> 3012 </span> : : * function then compares the two string by calling</a>
|
||
|
<a name="3013"><span class="lineNum"> 3013 </span> : : * traits::compare(substring.data(),__s,rlen). If the result of</a>
|
||
|
<a name="3014"><span class="lineNum"> 3014 </span> : : * the comparison is nonzero returns it, otherwise the shorter</a>
|
||
|
<a name="3015"><span class="lineNum"> 3015 </span> : : * one is ordered first.</a>
|
||
|
<a name="3016"><span class="lineNum"> 3016 </span> : : */</a>
|
||
|
<a name="3017"><span class="lineNum"> 3017 </span> : : int</a>
|
||
|
<a name="3018"><span class="lineNum"> 3018 </span> : : compare(size_type __pos, size_type __n1, const _CharT* __s) const;</a>
|
||
|
<a name="3019"><span class="lineNum"> 3019 </span> : : </a>
|
||
|
<a name="3020"><span class="lineNum"> 3020 </span> : : /**</a>
|
||
|
<a name="3021"><span class="lineNum"> 3021 </span> : : * @brief Compare substring against a character %array.</a>
|
||
|
<a name="3022"><span class="lineNum"> 3022 </span> : : * @param __pos Index of first character of substring.</a>
|
||
|
<a name="3023"><span class="lineNum"> 3023 </span> : : * @param __n1 Number of characters in substring.</a>
|
||
|
<a name="3024"><span class="lineNum"> 3024 </span> : : * @param __s character %array to compare against.</a>
|
||
|
<a name="3025"><span class="lineNum"> 3025 </span> : : * @param __n2 Number of characters of s.</a>
|
||
|
<a name="3026"><span class="lineNum"> 3026 </span> : : * @return Integer < 0, 0, or > 0.</a>
|
||
|
<a name="3027"><span class="lineNum"> 3027 </span> : : *</a>
|
||
|
<a name="3028"><span class="lineNum"> 3028 </span> : : * Form the substring of this string from the @a __n1</a>
|
||
|
<a name="3029"><span class="lineNum"> 3029 </span> : : * characters starting at @a __pos. Form a string from the</a>
|
||
|
<a name="3030"><span class="lineNum"> 3030 </span> : : * first @a __n2 characters of @a __s. Returns an integer < 0</a>
|
||
|
<a name="3031"><span class="lineNum"> 3031 </span> : : * if this substring is ordered before the string from @a __s,</a>
|
||
|
<a name="3032"><span class="lineNum"> 3032 </span> : : * 0 if their values are equivalent, or > 0 if this substring</a>
|
||
|
<a name="3033"><span class="lineNum"> 3033 </span> : : * is ordered after the string from @a __s. Determines the</a>
|
||
|
<a name="3034"><span class="lineNum"> 3034 </span> : : * effective length rlen of the strings to compare as the</a>
|
||
|
<a name="3035"><span class="lineNum"> 3035 </span> : : * smallest of the length of the substring and @a __n2. The</a>
|
||
|
<a name="3036"><span class="lineNum"> 3036 </span> : : * function then compares the two strings by calling</a>
|
||
|
<a name="3037"><span class="lineNum"> 3037 </span> : : * traits::compare(substring.data(),s,rlen). If the result of</a>
|
||
|
<a name="3038"><span class="lineNum"> 3038 </span> : : * the comparison is nonzero returns it, otherwise the shorter</a>
|
||
|
<a name="3039"><span class="lineNum"> 3039 </span> : : * one is ordered first.</a>
|
||
|
<a name="3040"><span class="lineNum"> 3040 </span> : : *</a>
|
||
|
<a name="3041"><span class="lineNum"> 3041 </span> : : * NB: s must have at least n2 characters, &apos;\\0&apos; has</a>
|
||
|
<a name="3042"><span class="lineNum"> 3042 </span> : : * no special meaning.</a>
|
||
|
<a name="3043"><span class="lineNum"> 3043 </span> : : */</a>
|
||
|
<a name="3044"><span class="lineNum"> 3044 </span> : : int</a>
|
||
|
<a name="3045"><span class="lineNum"> 3045 </span> : : compare(size_type __pos, size_type __n1, const _CharT* __s,</a>
|
||
|
<a name="3046"><span class="lineNum"> 3046 </span> : : size_type __n2) const;</a>
|
||
|
<a name="3047"><span class="lineNum"> 3047 </span> : : </a>
|
||
|
<a name="3048"><span class="lineNum"> 3048 </span> : : #if __cplusplus > 201703L</a>
|
||
|
<a name="3049"><span class="lineNum"> 3049 </span> : : bool</a>
|
||
|
<a name="3050"><span class="lineNum"> 3050 </span> : : starts_with(basic_string_view<_CharT, _Traits> __x) const noexcept</a>
|
||
|
<a name="3051"><span class="lineNum"> 3051 </span> : : { return __sv_type(this->data(), this->size()).starts_with(__x); }</a>
|
||
|
<a name="3052"><span class="lineNum"> 3052 </span> : : </a>
|
||
|
<a name="3053"><span class="lineNum"> 3053 </span> : : bool</a>
|
||
|
<a name="3054"><span class="lineNum"> 3054 </span> : : starts_with(_CharT __x) const noexcept</a>
|
||
|
<a name="3055"><span class="lineNum"> 3055 </span> : : { return __sv_type(this->data(), this->size()).starts_with(__x); }</a>
|
||
|
<a name="3056"><span class="lineNum"> 3056 </span> : : </a>
|
||
|
<a name="3057"><span class="lineNum"> 3057 </span> : : bool</a>
|
||
|
<a name="3058"><span class="lineNum"> 3058 </span> : : starts_with(const _CharT* __x) const noexcept</a>
|
||
|
<a name="3059"><span class="lineNum"> 3059 </span> : : { return __sv_type(this->data(), this->size()).starts_with(__x); }</a>
|
||
|
<a name="3060"><span class="lineNum"> 3060 </span> : : </a>
|
||
|
<a name="3061"><span class="lineNum"> 3061 </span> : : bool</a>
|
||
|
<a name="3062"><span class="lineNum"> 3062 </span> : : ends_with(basic_string_view<_CharT, _Traits> __x) const noexcept</a>
|
||
|
<a name="3063"><span class="lineNum"> 3063 </span> : : { return __sv_type(this->data(), this->size()).ends_with(__x); }</a>
|
||
|
<a name="3064"><span class="lineNum"> 3064 </span> : : </a>
|
||
|
<a name="3065"><span class="lineNum"> 3065 </span> : : bool</a>
|
||
|
<a name="3066"><span class="lineNum"> 3066 </span> : : ends_with(_CharT __x) const noexcept</a>
|
||
|
<a name="3067"><span class="lineNum"> 3067 </span> : : { return __sv_type(this->data(), this->size()).ends_with(__x); }</a>
|
||
|
<a name="3068"><span class="lineNum"> 3068 </span> : : </a>
|
||
|
<a name="3069"><span class="lineNum"> 3069 </span> : : bool</a>
|
||
|
<a name="3070"><span class="lineNum"> 3070 </span> : : ends_with(const _CharT* __x) const noexcept</a>
|
||
|
<a name="3071"><span class="lineNum"> 3071 </span> : : { return __sv_type(this->data(), this->size()).ends_with(__x); }</a>
|
||
|
<a name="3072"><span class="lineNum"> 3072 </span> : : #endif // C++20</a>
|
||
|
<a name="3073"><span class="lineNum"> 3073 </span> : : </a>
|
||
|
<a name="3074"><span class="lineNum"> 3074 </span> : : // Allow basic_stringbuf::__xfer_bufptrs to call _M_length:</a>
|
||
|
<a name="3075"><span class="lineNum"> 3075 </span> : : template<typename, typename, typename> friend class basic_stringbuf;</a>
|
||
|
<a name="3076"><span class="lineNum"> 3076 </span> : : };</a>
|
||
|
<a name="3077"><span class="lineNum"> 3077 </span> : : _GLIBCXX_END_NAMESPACE_CXX11</a>
|
||
|
<a name="3078"><span class="lineNum"> 3078 </span> : : #else // !_GLIBCXX_USE_CXX11_ABI</a>
|
||
|
<a name="3079"><span class="lineNum"> 3079 </span> : : // Reference-counted COW string implentation</a>
|
||
|
<a name="3080"><span class="lineNum"> 3080 </span> : : </a>
|
||
|
<a name="3081"><span class="lineNum"> 3081 </span> : : /**</a>
|
||
|
<a name="3082"><span class="lineNum"> 3082 </span> : : * @class basic_string basic_string.h <string></a>
|
||
|
<a name="3083"><span class="lineNum"> 3083 </span> : : * @brief Managing sequences of characters and character-like objects.</a>
|
||
|
<a name="3084"><span class="lineNum"> 3084 </span> : : *</a>
|
||
|
<a name="3085"><span class="lineNum"> 3085 </span> : : * @ingroup strings</a>
|
||
|
<a name="3086"><span class="lineNum"> 3086 </span> : : * @ingroup sequences</a>
|
||
|
<a name="3087"><span class="lineNum"> 3087 </span> : : *</a>
|
||
|
<a name="3088"><span class="lineNum"> 3088 </span> : : * @tparam _CharT Type of character</a>
|
||
|
<a name="3089"><span class="lineNum"> 3089 </span> : : * @tparam _Traits Traits for character type, defaults to</a>
|
||
|
<a name="3090"><span class="lineNum"> 3090 </span> : : * char_traits<_CharT>.</a>
|
||
|
<a name="3091"><span class="lineNum"> 3091 </span> : : * @tparam _Alloc Allocator type, defaults to allocator<_CharT>.</a>
|
||
|
<a name="3092"><span class="lineNum"> 3092 </span> : : *</a>
|
||
|
<a name="3093"><span class="lineNum"> 3093 </span> : : * Meets the requirements of a <a href="tables.html#65">container</a>, a</a>
|
||
|
<a name="3094"><span class="lineNum"> 3094 </span> : : * <a href="tables.html#66">reversible container</a>, and a</a>
|
||
|
<a name="3095"><span class="lineNum"> 3095 </span> : : * <a href="tables.html#67">sequence</a>. Of the</a>
|
||
|
<a name="3096"><span class="lineNum"> 3096 </span> : : * <a href="tables.html#68">optional sequence requirements</a>, only</a>
|
||
|
<a name="3097"><span class="lineNum"> 3097 </span> : : * @c push_back, @c at, and @c %array access are supported.</a>
|
||
|
<a name="3098"><span class="lineNum"> 3098 </span> : : *</a>
|
||
|
<a name="3099"><span class="lineNum"> 3099 </span> : : * @doctodo</a>
|
||
|
<a name="3100"><span class="lineNum"> 3100 </span> : : *</a>
|
||
|
<a name="3101"><span class="lineNum"> 3101 </span> : : *</a>
|
||
|
<a name="3102"><span class="lineNum"> 3102 </span> : : * Documentation? What's that?</a>
|
||
|
<a name="3103"><span class="lineNum"> 3103 </span> : : * Nathan Myers <ncm@cantrip.org>.</a>
|
||
|
<a name="3104"><span class="lineNum"> 3104 </span> : : *</a>
|
||
|
<a name="3105"><span class="lineNum"> 3105 </span> : : * A string looks like this:</a>
|
||
|
<a name="3106"><span class="lineNum"> 3106 </span> : : *</a>
|
||
|
<a name="3107"><span class="lineNum"> 3107 </span> : : * @code</a>
|
||
|
<a name="3108"><span class="lineNum"> 3108 </span> : : * [_Rep]</a>
|
||
|
<a name="3109"><span class="lineNum"> 3109 </span> : : * _M_length</a>
|
||
|
<a name="3110"><span class="lineNum"> 3110 </span> : : * [basic_string<char_type>] _M_capacity</a>
|
||
|
<a name="3111"><span class="lineNum"> 3111 </span> : : * _M_dataplus _M_refcount</a>
|
||
|
<a name="3112"><span class="lineNum"> 3112 </span> : : * _M_p ----------------> unnamed array of char_type</a>
|
||
|
<a name="3113"><span class="lineNum"> 3113 </span> : : * @endcode</a>
|
||
|
<a name="3114"><span class="lineNum"> 3114 </span> : : *</a>
|
||
|
<a name="3115"><span class="lineNum"> 3115 </span> : : * Where the _M_p points to the first character in the string, and</a>
|
||
|
<a name="3116"><span class="lineNum"> 3116 </span> : : * you cast it to a pointer-to-_Rep and subtract 1 to get a</a>
|
||
|
<a name="3117"><span class="lineNum"> 3117 </span> : : * pointer to the header.</a>
|
||
|
<a name="3118"><span class="lineNum"> 3118 </span> : : *</a>
|
||
|
<a name="3119"><span class="lineNum"> 3119 </span> : : * This approach has the enormous advantage that a string object</a>
|
||
|
<a name="3120"><span class="lineNum"> 3120 </span> : : * requires only one allocation. All the ugliness is confined</a>
|
||
|
<a name="3121"><span class="lineNum"> 3121 </span> : : * within a single %pair of inline functions, which each compile to</a>
|
||
|
<a name="3122"><span class="lineNum"> 3122 </span> : : * a single @a add instruction: _Rep::_M_data(), and</a>
|
||
|
<a name="3123"><span class="lineNum"> 3123 </span> : : * string::_M_rep(); and the allocation function which gets a</a>
|
||
|
<a name="3124"><span class="lineNum"> 3124 </span> : : * block of raw bytes and with room enough and constructs a _Rep</a>
|
||
|
<a name="3125"><span class="lineNum"> 3125 </span> : : * object at the front.</a>
|
||
|
<a name="3126"><span class="lineNum"> 3126 </span> : : *</a>
|
||
|
<a name="3127"><span class="lineNum"> 3127 </span> : : * The reason you want _M_data pointing to the character %array and</a>
|
||
|
<a name="3128"><span class="lineNum"> 3128 </span> : : * not the _Rep is so that the debugger can see the string</a>
|
||
|
<a name="3129"><span class="lineNum"> 3129 </span> : : * contents. (Probably we should add a non-inline member to get</a>
|
||
|
<a name="3130"><span class="lineNum"> 3130 </span> : : * the _Rep for the debugger to use, so users can check the actual</a>
|
||
|
<a name="3131"><span class="lineNum"> 3131 </span> : : * string length.)</a>
|
||
|
<a name="3132"><span class="lineNum"> 3132 </span> : : *</a>
|
||
|
<a name="3133"><span class="lineNum"> 3133 </span> : : * Note that the _Rep object is a POD so that you can have a</a>
|
||
|
<a name="3134"><span class="lineNum"> 3134 </span> : : * static <em>empty string</em> _Rep object already @a constructed before</a>
|
||
|
<a name="3135"><span class="lineNum"> 3135 </span> : : * static constructors have run. The reference-count encoding is</a>
|
||
|
<a name="3136"><span class="lineNum"> 3136 </span> : : * chosen so that a 0 indicates one reference, so you never try to</a>
|
||
|
<a name="3137"><span class="lineNum"> 3137 </span> : : * destroy the empty-string _Rep object.</a>
|
||
|
<a name="3138"><span class="lineNum"> 3138 </span> : : *</a>
|
||
|
<a name="3139"><span class="lineNum"> 3139 </span> : : * All but the last paragraph is considered pretty conventional</a>
|
||
|
<a name="3140"><span class="lineNum"> 3140 </span> : : * for a C++ string implementation.</a>
|
||
|
<a name="3141"><span class="lineNum"> 3141 </span> : : */</a>
|
||
|
<a name="3142"><span class="lineNum"> 3142 </span> : : // 21.3 Template class basic_string</a>
|
||
|
<a name="3143"><span class="lineNum"> 3143 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="3144"><span class="lineNum"> 3144 </span> : : class basic_string</a>
|
||
|
<a name="3145"><span class="lineNum"> 3145 </span> : : {</a>
|
||
|
<a name="3146"><span class="lineNum"> 3146 </span> : : typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type;</a>
|
||
|
<a name="3147"><span class="lineNum"> 3147 </span> : : </a>
|
||
|
<a name="3148"><span class="lineNum"> 3148 </span> : : // Types:</a>
|
||
|
<a name="3149"><span class="lineNum"> 3149 </span> : : public:</a>
|
||
|
<a name="3150"><span class="lineNum"> 3150 </span> : : typedef _Traits traits_type;</a>
|
||
|
<a name="3151"><span class="lineNum"> 3151 </span> : : typedef typename _Traits::char_type value_type;</a>
|
||
|
<a name="3152"><span class="lineNum"> 3152 </span> : : typedef _Alloc allocator_type;</a>
|
||
|
<a name="3153"><span class="lineNum"> 3153 </span> : : typedef typename _CharT_alloc_type::size_type size_type;</a>
|
||
|
<a name="3154"><span class="lineNum"> 3154 </span> : : typedef typename _CharT_alloc_type::difference_type difference_type;</a>
|
||
|
<a name="3155"><span class="lineNum"> 3155 </span> : : #if __cplusplus < 201103L</a>
|
||
|
<a name="3156"><span class="lineNum"> 3156 </span> : : typedef typename _CharT_alloc_type::reference reference;</a>
|
||
|
<a name="3157"><span class="lineNum"> 3157 </span> : : typedef typename _CharT_alloc_type::const_reference const_reference;</a>
|
||
|
<a name="3158"><span class="lineNum"> 3158 </span> : : #else</a>
|
||
|
<a name="3159"><span class="lineNum"> 3159 </span> : : typedef value_type& reference;</a>
|
||
|
<a name="3160"><span class="lineNum"> 3160 </span> : : typedef const value_type& const_reference;</a>
|
||
|
<a name="3161"><span class="lineNum"> 3161 </span> : : #endif</a>
|
||
|
<a name="3162"><span class="lineNum"> 3162 </span> : : typedef typename _CharT_alloc_type::pointer pointer;</a>
|
||
|
<a name="3163"><span class="lineNum"> 3163 </span> : : typedef typename _CharT_alloc_type::const_pointer const_pointer;</a>
|
||
|
<a name="3164"><span class="lineNum"> 3164 </span> : : typedef __gnu_cxx::__normal_iterator<pointer, basic_string> iterator;</a>
|
||
|
<a name="3165"><span class="lineNum"> 3165 </span> : : typedef __gnu_cxx::__normal_iterator<const_pointer, basic_string></a>
|
||
|
<a name="3166"><span class="lineNum"> 3166 </span> : : const_iterator;</a>
|
||
|
<a name="3167"><span class="lineNum"> 3167 </span> : : typedef std::reverse_iterator<const_iterator> const_reverse_iterator;</a>
|
||
|
<a name="3168"><span class="lineNum"> 3168 </span> : : typedef std::reverse_iterator<iterator> reverse_iterator;</a>
|
||
|
<a name="3169"><span class="lineNum"> 3169 </span> : : </a>
|
||
|
<a name="3170"><span class="lineNum"> 3170 </span> : : protected:</a>
|
||
|
<a name="3171"><span class="lineNum"> 3171 </span> : : // type used for positions in insert, erase etc.</a>
|
||
|
<a name="3172"><span class="lineNum"> 3172 </span> : : typedef iterator __const_iterator;</a>
|
||
|
<a name="3173"><span class="lineNum"> 3173 </span> : : </a>
|
||
|
<a name="3174"><span class="lineNum"> 3174 </span> : : private:</a>
|
||
|
<a name="3175"><span class="lineNum"> 3175 </span> : : // _Rep: string representation</a>
|
||
|
<a name="3176"><span class="lineNum"> 3176 </span> : : // Invariants:</a>
|
||
|
<a name="3177"><span class="lineNum"> 3177 </span> : : // 1. String really contains _M_length + 1 characters: due to 21.3.4</a>
|
||
|
<a name="3178"><span class="lineNum"> 3178 </span> : : // must be kept null-terminated.</a>
|
||
|
<a name="3179"><span class="lineNum"> 3179 </span> : : // 2. _M_capacity >= _M_length</a>
|
||
|
<a name="3180"><span class="lineNum"> 3180 </span> : : // Allocated memory is always (_M_capacity + 1) * sizeof(_CharT).</a>
|
||
|
<a name="3181"><span class="lineNum"> 3181 </span> : : // 3. _M_refcount has three states:</a>
|
||
|
<a name="3182"><span class="lineNum"> 3182 </span> : : // -1: leaked, one reference, no ref-copies allowed, non-const.</a>
|
||
|
<a name="3183"><span class="lineNum"> 3183 </span> : : // 0: one reference, non-const.</a>
|
||
|
<a name="3184"><span class="lineNum"> 3184 </span> : : // n>0: n + 1 references, operations require a lock, const.</a>
|
||
|
<a name="3185"><span class="lineNum"> 3185 </span> : : // 4. All fields==0 is an empty string, given the extra storage</a>
|
||
|
<a name="3186"><span class="lineNum"> 3186 </span> : : // beyond-the-end for a null terminator; thus, the shared</a>
|
||
|
<a name="3187"><span class="lineNum"> 3187 </span> : : // empty string representation needs no constructor.</a>
|
||
|
<a name="3188"><span class="lineNum"> 3188 </span> : : </a>
|
||
|
<a name="3189"><span class="lineNum"> 3189 </span> : : struct _Rep_base</a>
|
||
|
<a name="3190"><span class="lineNum"> 3190 </span> : : {</a>
|
||
|
<a name="3191"><span class="lineNum"> 3191 </span> : : size_type _M_length;</a>
|
||
|
<a name="3192"><span class="lineNum"> 3192 </span> : : size_type _M_capacity;</a>
|
||
|
<a name="3193"><span class="lineNum"> 3193 </span> : : _Atomic_word _M_refcount;</a>
|
||
|
<a name="3194"><span class="lineNum"> 3194 </span> : : };</a>
|
||
|
<a name="3195"><span class="lineNum"> 3195 </span> : : </a>
|
||
|
<a name="3196"><span class="lineNum"> 3196 </span> : : struct _Rep : _Rep_base</a>
|
||
|
<a name="3197"><span class="lineNum"> 3197 </span> : : {</a>
|
||
|
<a name="3198"><span class="lineNum"> 3198 </span> : : // Types:</a>
|
||
|
<a name="3199"><span class="lineNum"> 3199 </span> : : typedef typename _Alloc::template rebind<char>::other _Raw_bytes_alloc;</a>
|
||
|
<a name="3200"><span class="lineNum"> 3200 </span> : : </a>
|
||
|
<a name="3201"><span class="lineNum"> 3201 </span> : : // (Public) Data members:</a>
|
||
|
<a name="3202"><span class="lineNum"> 3202 </span> : : </a>
|
||
|
<a name="3203"><span class="lineNum"> 3203 </span> : : // The maximum number of individual char_type elements of an</a>
|
||
|
<a name="3204"><span class="lineNum"> 3204 </span> : : // individual string is determined by _S_max_size. This is the</a>
|
||
|
<a name="3205"><span class="lineNum"> 3205 </span> : : // value that will be returned by max_size(). (Whereas npos</a>
|
||
|
<a name="3206"><span class="lineNum"> 3206 </span> : : // is the maximum number of bytes the allocator can allocate.)</a>
|
||
|
<a name="3207"><span class="lineNum"> 3207 </span> : : // If one was to divvy up the theoretical largest size string,</a>
|
||
|
<a name="3208"><span class="lineNum"> 3208 </span> : : // with a terminating character and m _CharT elements, it'd</a>
|
||
|
<a name="3209"><span class="lineNum"> 3209 </span> : : // look like this:</a>
|
||
|
<a name="3210"><span class="lineNum"> 3210 </span> : : // npos = sizeof(_Rep) + (m * sizeof(_CharT)) + sizeof(_CharT)</a>
|
||
|
<a name="3211"><span class="lineNum"> 3211 </span> : : // Solving for m:</a>
|
||
|
<a name="3212"><span class="lineNum"> 3212 </span> : : // m = ((npos - sizeof(_Rep))/sizeof(CharT)) - 1</a>
|
||
|
<a name="3213"><span class="lineNum"> 3213 </span> : : // In addition, this implementation quarters this amount.</a>
|
||
|
<a name="3214"><span class="lineNum"> 3214 </span> : : static const size_type _S_max_size;</a>
|
||
|
<a name="3215"><span class="lineNum"> 3215 </span> : : static const _CharT _S_terminal;</a>
|
||
|
<a name="3216"><span class="lineNum"> 3216 </span> : : </a>
|
||
|
<a name="3217"><span class="lineNum"> 3217 </span> : : // The following storage is init'd to 0 by the linker, resulting</a>
|
||
|
<a name="3218"><span class="lineNum"> 3218 </span> : : // (carefully) in an empty string with one reference.</a>
|
||
|
<a name="3219"><span class="lineNum"> 3219 </span> : : static size_type _S_empty_rep_storage[];</a>
|
||
|
<a name="3220"><span class="lineNum"> 3220 </span> : : </a>
|
||
|
<a name="3221"><span class="lineNum"> 3221 </span> : : static _Rep&</a>
|
||
|
<a name="3222"><span class="lineNum"> 3222 </span> : : _S_empty_rep() _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3223"><span class="lineNum"> 3223 </span> : : { </a>
|
||
|
<a name="3224"><span class="lineNum"> 3224 </span> : : // NB: Mild hack to avoid strict-aliasing warnings. Note that</a>
|
||
|
<a name="3225"><span class="lineNum"> 3225 </span> : : // _S_empty_rep_storage is never modified and the punning should</a>
|
||
|
<a name="3226"><span class="lineNum"> 3226 </span> : : // be reasonably safe in this case.</a>
|
||
|
<a name="3227"><span class="lineNum"> 3227 </span> : : void* __p = reinterpret_cast<void*>(&_S_empty_rep_storage);</a>
|
||
|
<a name="3228"><span class="lineNum"> 3228 </span> : : return *reinterpret_cast<_Rep*>(__p);</a>
|
||
|
<a name="3229"><span class="lineNum"> 3229 </span> : : }</a>
|
||
|
<a name="3230"><span class="lineNum"> 3230 </span> : : </a>
|
||
|
<a name="3231"><span class="lineNum"> 3231 </span> : : bool</a>
|
||
|
<a name="3232"><span class="lineNum"> 3232 </span> : : _M_is_leaked() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3233"><span class="lineNum"> 3233 </span> : : {</a>
|
||
|
<a name="3234"><span class="lineNum"> 3234 </span> : : #if defined(__GTHREADS)</a>
|
||
|
<a name="3235"><span class="lineNum"> 3235 </span> : : // _M_refcount is mutated concurrently by _M_refcopy/_M_dispose,</a>
|
||
|
<a name="3236"><span class="lineNum"> 3236 </span> : : // so we need to use an atomic load. However, _M_is_leaked</a>
|
||
|
<a name="3237"><span class="lineNum"> 3237 </span> : : // predicate does not change concurrently (i.e. the string is either</a>
|
||
|
<a name="3238"><span class="lineNum"> 3238 </span> : : // leaked or not), so a relaxed load is enough.</a>
|
||
|
<a name="3239"><span class="lineNum"> 3239 </span> : : return __atomic_load_n(&this->_M_refcount, __ATOMIC_RELAXED) < 0;</a>
|
||
|
<a name="3240"><span class="lineNum"> 3240 </span> : : #else</a>
|
||
|
<a name="3241"><span class="lineNum"> 3241 </span> : : return this->_M_refcount < 0;</a>
|
||
|
<a name="3242"><span class="lineNum"> 3242 </span> : : #endif</a>
|
||
|
<a name="3243"><span class="lineNum"> 3243 </span> : : }</a>
|
||
|
<a name="3244"><span class="lineNum"> 3244 </span> : : </a>
|
||
|
<a name="3245"><span class="lineNum"> 3245 </span> : : bool</a>
|
||
|
<a name="3246"><span class="lineNum"> 3246 </span> : : _M_is_shared() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3247"><span class="lineNum"> 3247 </span> : : {</a>
|
||
|
<a name="3248"><span class="lineNum"> 3248 </span> : : #if defined(__GTHREADS)</a>
|
||
|
<a name="3249"><span class="lineNum"> 3249 </span> : : // _M_refcount is mutated concurrently by _M_refcopy/_M_dispose,</a>
|
||
|
<a name="3250"><span class="lineNum"> 3250 </span> : : // so we need to use an atomic load. Another thread can drop last</a>
|
||
|
<a name="3251"><span class="lineNum"> 3251 </span> : : // but one reference concurrently with this check, so we need this</a>
|
||
|
<a name="3252"><span class="lineNum"> 3252 </span> : : // load to be acquire to synchronize with release fetch_and_add in</a>
|
||
|
<a name="3253"><span class="lineNum"> 3253 </span> : : // _M_dispose.</a>
|
||
|
<a name="3254"><span class="lineNum"> 3254 </span> : : return __atomic_load_n(&this->_M_refcount, __ATOMIC_ACQUIRE) > 0;</a>
|
||
|
<a name="3255"><span class="lineNum"> 3255 </span> : : #else</a>
|
||
|
<a name="3256"><span class="lineNum"> 3256 </span> : : return this->_M_refcount > 0;</a>
|
||
|
<a name="3257"><span class="lineNum"> 3257 </span> : : #endif</a>
|
||
|
<a name="3258"><span class="lineNum"> 3258 </span> : : }</a>
|
||
|
<a name="3259"><span class="lineNum"> 3259 </span> : : </a>
|
||
|
<a name="3260"><span class="lineNum"> 3260 </span> : : void</a>
|
||
|
<a name="3261"><span class="lineNum"> 3261 </span> : : _M_set_leaked() _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3262"><span class="lineNum"> 3262 </span> : : { this->_M_refcount = -1; }</a>
|
||
|
<a name="3263"><span class="lineNum"> 3263 </span> : : </a>
|
||
|
<a name="3264"><span class="lineNum"> 3264 </span> : : void</a>
|
||
|
<a name="3265"><span class="lineNum"> 3265 </span> : : _M_set_sharable() _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3266"><span class="lineNum"> 3266 </span> : : { this->_M_refcount = 0; }</a>
|
||
|
<a name="3267"><span class="lineNum"> 3267 </span> : : </a>
|
||
|
<a name="3268"><span class="lineNum"> 3268 </span> : : void</a>
|
||
|
<a name="3269"><span class="lineNum"> 3269 </span> : : _M_set_length_and_sharable(size_type __n) _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3270"><span class="lineNum"> 3270 </span> : : {</a>
|
||
|
<a name="3271"><span class="lineNum"> 3271 </span> : : #if _GLIBCXX_FULLY_DYNAMIC_STRING == 0</a>
|
||
|
<a name="3272"><span class="lineNum"> 3272 </span> : : if (__builtin_expect(this != &_S_empty_rep(), false))</a>
|
||
|
<a name="3273"><span class="lineNum"> 3273 </span> : : #endif</a>
|
||
|
<a name="3274"><span class="lineNum"> 3274 </span> : : {</a>
|
||
|
<a name="3275"><span class="lineNum"> 3275 </span> : : this->_M_set_sharable(); // One reference.</a>
|
||
|
<a name="3276"><span class="lineNum"> 3276 </span> : : this->_M_length = __n;</a>
|
||
|
<a name="3277"><span class="lineNum"> 3277 </span> : : traits_type::assign(this->_M_refdata()[__n], _S_terminal);</a>
|
||
|
<a name="3278"><span class="lineNum"> 3278 </span> : : // grrr. (per 21.3.4)</a>
|
||
|
<a name="3279"><span class="lineNum"> 3279 </span> : : // You cannot leave those LWG people alone for a second.</a>
|
||
|
<a name="3280"><span class="lineNum"> 3280 </span> : : }</a>
|
||
|
<a name="3281"><span class="lineNum"> 3281 </span> : : }</a>
|
||
|
<a name="3282"><span class="lineNum"> 3282 </span> : : </a>
|
||
|
<a name="3283"><span class="lineNum"> 3283 </span> : : _CharT*</a>
|
||
|
<a name="3284"><span class="lineNum"> 3284 </span> : : _M_refdata() throw()</a>
|
||
|
<a name="3285"><span class="lineNum"> 3285 </span> : : { return reinterpret_cast<_CharT*>(this + 1); }</a>
|
||
|
<a name="3286"><span class="lineNum"> 3286 </span> : : </a>
|
||
|
<a name="3287"><span class="lineNum"> 3287 </span> : : _CharT*</a>
|
||
|
<a name="3288"><span class="lineNum"> 3288 </span> : : _M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2)</a>
|
||
|
<a name="3289"><span class="lineNum"> 3289 </span> : : {</a>
|
||
|
<a name="3290"><span class="lineNum"> 3290 </span> : : return (!_M_is_leaked() && __alloc1 == __alloc2)</a>
|
||
|
<a name="3291"><span class="lineNum"> 3291 </span> : : ? _M_refcopy() : _M_clone(__alloc1);</a>
|
||
|
<a name="3292"><span class="lineNum"> 3292 </span> : : }</a>
|
||
|
<a name="3293"><span class="lineNum"> 3293 </span> : : </a>
|
||
|
<a name="3294"><span class="lineNum"> 3294 </span> : : // Create & Destroy</a>
|
||
|
<a name="3295"><span class="lineNum"> 3295 </span> : : static _Rep*</a>
|
||
|
<a name="3296"><span class="lineNum"> 3296 </span> : : _S_create(size_type, size_type, const _Alloc&);</a>
|
||
|
<a name="3297"><span class="lineNum"> 3297 </span> : : </a>
|
||
|
<a name="3298"><span class="lineNum"> 3298 </span> : : void</a>
|
||
|
<a name="3299"><span class="lineNum"> 3299 </span> : : _M_dispose(const _Alloc& __a) _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3300"><span class="lineNum"> 3300 </span> : : {</a>
|
||
|
<a name="3301"><span class="lineNum"> 3301 </span> : : #if _GLIBCXX_FULLY_DYNAMIC_STRING == 0</a>
|
||
|
<a name="3302"><span class="lineNum"> 3302 </span> : : if (__builtin_expect(this != &_S_empty_rep(), false))</a>
|
||
|
<a name="3303"><span class="lineNum"> 3303 </span> : : #endif</a>
|
||
|
<a name="3304"><span class="lineNum"> 3304 </span> : : {</a>
|
||
|
<a name="3305"><span class="lineNum"> 3305 </span> : : // Be race-detector-friendly. For more info see bits/c++config.</a>
|
||
|
<a name="3306"><span class="lineNum"> 3306 </span> : : _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&this->_M_refcount);</a>
|
||
|
<a name="3307"><span class="lineNum"> 3307 </span> : : // Decrement of _M_refcount is acq_rel, because:</a>
|
||
|
<a name="3308"><span class="lineNum"> 3308 </span> : : // - all but last decrements need to release to synchronize with</a>
|
||
|
<a name="3309"><span class="lineNum"> 3309 </span> : : // the last decrement that will delete the object.</a>
|
||
|
<a name="3310"><span class="lineNum"> 3310 </span> : : // - the last decrement needs to acquire to synchronize with</a>
|
||
|
<a name="3311"><span class="lineNum"> 3311 </span> : : // all the previous decrements.</a>
|
||
|
<a name="3312"><span class="lineNum"> 3312 </span> : : // - last but one decrement needs to release to synchronize with</a>
|
||
|
<a name="3313"><span class="lineNum"> 3313 </span> : : // the acquire load in _M_is_shared that will conclude that</a>
|
||
|
<a name="3314"><span class="lineNum"> 3314 </span> : : // the object is not shared anymore.</a>
|
||
|
<a name="3315"><span class="lineNum"> 3315 </span> : : if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount,</a>
|
||
|
<a name="3316"><span class="lineNum"> 3316 </span> : : -1) <= 0)</a>
|
||
|
<a name="3317"><span class="lineNum"> 3317 </span> : : {</a>
|
||
|
<a name="3318"><span class="lineNum"> 3318 </span> : : _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&this->_M_refcount);</a>
|
||
|
<a name="3319"><span class="lineNum"> 3319 </span> : : _M_destroy(__a);</a>
|
||
|
<a name="3320"><span class="lineNum"> 3320 </span> : : }</a>
|
||
|
<a name="3321"><span class="lineNum"> 3321 </span> : : }</a>
|
||
|
<a name="3322"><span class="lineNum"> 3322 </span> : : } // XXX MT</a>
|
||
|
<a name="3323"><span class="lineNum"> 3323 </span> : : </a>
|
||
|
<a name="3324"><span class="lineNum"> 3324 </span> : : void</a>
|
||
|
<a name="3325"><span class="lineNum"> 3325 </span> : : _M_destroy(const _Alloc&) throw();</a>
|
||
|
<a name="3326"><span class="lineNum"> 3326 </span> : : </a>
|
||
|
<a name="3327"><span class="lineNum"> 3327 </span> : : _CharT*</a>
|
||
|
<a name="3328"><span class="lineNum"> 3328 </span> : : _M_refcopy() throw()</a>
|
||
|
<a name="3329"><span class="lineNum"> 3329 </span> : : {</a>
|
||
|
<a name="3330"><span class="lineNum"> 3330 </span> : : #if _GLIBCXX_FULLY_DYNAMIC_STRING == 0</a>
|
||
|
<a name="3331"><span class="lineNum"> 3331 </span> : : if (__builtin_expect(this != &_S_empty_rep(), false))</a>
|
||
|
<a name="3332"><span class="lineNum"> 3332 </span> : : #endif</a>
|
||
|
<a name="3333"><span class="lineNum"> 3333 </span> : : __gnu_cxx::__atomic_add_dispatch(&this->_M_refcount, 1);</a>
|
||
|
<a name="3334"><span class="lineNum"> 3334 </span> : : return _M_refdata();</a>
|
||
|
<a name="3335"><span class="lineNum"> 3335 </span> : : } // XXX MT</a>
|
||
|
<a name="3336"><span class="lineNum"> 3336 </span> : : </a>
|
||
|
<a name="3337"><span class="lineNum"> 3337 </span> : : _CharT*</a>
|
||
|
<a name="3338"><span class="lineNum"> 3338 </span> : : _M_clone(const _Alloc&, size_type __res = 0);</a>
|
||
|
<a name="3339"><span class="lineNum"> 3339 </span> : : };</a>
|
||
|
<a name="3340"><span class="lineNum"> 3340 </span> : : </a>
|
||
|
<a name="3341"><span class="lineNum"> 3341 </span> : : // Use empty-base optimization: http://www.cantrip.org/emptyopt.html</a>
|
||
|
<a name="3342"><span class="lineNum"> 3342 </span> : : struct _Alloc_hider : _Alloc</a>
|
||
|
<a name="3343"><span class="lineNum"> 3343 </span> : : {</a>
|
||
|
<a name="3344"><span class="lineNum"> 3344 </span> : : _Alloc_hider(_CharT* __dat, const _Alloc& __a) _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3345"><span class="lineNum"> 3345 </span> : : : _Alloc(__a), _M_p(__dat) { }</a>
|
||
|
<a name="3346"><span class="lineNum"> 3346 </span> : : </a>
|
||
|
<a name="3347"><span class="lineNum"> 3347 </span> : : _CharT* _M_p; // The actual data.</a>
|
||
|
<a name="3348"><span class="lineNum"> 3348 </span> : : };</a>
|
||
|
<a name="3349"><span class="lineNum"> 3349 </span> : : </a>
|
||
|
<a name="3350"><span class="lineNum"> 3350 </span> : : public:</a>
|
||
|
<a name="3351"><span class="lineNum"> 3351 </span> : : // Data Members (public):</a>
|
||
|
<a name="3352"><span class="lineNum"> 3352 </span> : : // NB: This is an unsigned type, and thus represents the maximum</a>
|
||
|
<a name="3353"><span class="lineNum"> 3353 </span> : : // size that the allocator can hold.</a>
|
||
|
<a name="3354"><span class="lineNum"> 3354 </span> : : /// Value returned by various member functions when they fail.</a>
|
||
|
<a name="3355"><span class="lineNum"> 3355 </span> : : static const size_type npos = static_cast<size_type>(-1);</a>
|
||
|
<a name="3356"><span class="lineNum"> 3356 </span> : : </a>
|
||
|
<a name="3357"><span class="lineNum"> 3357 </span> : : private:</a>
|
||
|
<a name="3358"><span class="lineNum"> 3358 </span> : : // Data Members (private):</a>
|
||
|
<a name="3359"><span class="lineNum"> 3359 </span> : : mutable _Alloc_hider _M_dataplus;</a>
|
||
|
<a name="3360"><span class="lineNum"> 3360 </span> : : </a>
|
||
|
<a name="3361"><span class="lineNum"> 3361 </span> : : _CharT*</a>
|
||
|
<a name="3362"><span class="lineNum"> 3362 </span> : : _M_data() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3363"><span class="lineNum"> 3363 </span> : : { return _M_dataplus._M_p; }</a>
|
||
|
<a name="3364"><span class="lineNum"> 3364 </span> : : </a>
|
||
|
<a name="3365"><span class="lineNum"> 3365 </span> : : _CharT*</a>
|
||
|
<a name="3366"><span class="lineNum"> 3366 </span> : : _M_data(_CharT* __p) _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3367"><span class="lineNum"> 3367 </span> : : { return (_M_dataplus._M_p = __p); }</a>
|
||
|
<a name="3368"><span class="lineNum"> 3368 </span> : : </a>
|
||
|
<a name="3369"><span class="lineNum"> 3369 </span> : : _Rep*</a>
|
||
|
<a name="3370"><span class="lineNum"> 3370 </span> : : _M_rep() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3371"><span class="lineNum"> 3371 </span> : : { return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); }</a>
|
||
|
<a name="3372"><span class="lineNum"> 3372 </span> : : </a>
|
||
|
<a name="3373"><span class="lineNum"> 3373 </span> : : // For the internal use we have functions similar to `begin'/`end'</a>
|
||
|
<a name="3374"><span class="lineNum"> 3374 </span> : : // but they do not call _M_leak.</a>
|
||
|
<a name="3375"><span class="lineNum"> 3375 </span> : : iterator</a>
|
||
|
<a name="3376"><span class="lineNum"> 3376 </span> : : _M_ibegin() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3377"><span class="lineNum"> 3377 </span> : : { return iterator(_M_data()); }</a>
|
||
|
<a name="3378"><span class="lineNum"> 3378 </span> : : </a>
|
||
|
<a name="3379"><span class="lineNum"> 3379 </span> : : iterator</a>
|
||
|
<a name="3380"><span class="lineNum"> 3380 </span> : : _M_iend() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3381"><span class="lineNum"> 3381 </span> : : { return iterator(_M_data() + this->size()); }</a>
|
||
|
<a name="3382"><span class="lineNum"> 3382 </span> : : </a>
|
||
|
<a name="3383"><span class="lineNum"> 3383 </span> : : void</a>
|
||
|
<a name="3384"><span class="lineNum"> 3384 </span> : : _M_leak() // for use in begin() & non-const op[]</a>
|
||
|
<a name="3385"><span class="lineNum"> 3385 </span> : : {</a>
|
||
|
<a name="3386"><span class="lineNum"> 3386 </span> : : if (!_M_rep()->_M_is_leaked())</a>
|
||
|
<a name="3387"><span class="lineNum"> 3387 </span> : : _M_leak_hard();</a>
|
||
|
<a name="3388"><span class="lineNum"> 3388 </span> : : }</a>
|
||
|
<a name="3389"><span class="lineNum"> 3389 </span> : : </a>
|
||
|
<a name="3390"><span class="lineNum"> 3390 </span> : : size_type</a>
|
||
|
<a name="3391"><span class="lineNum"> 3391 </span> : : _M_check(size_type __pos, const char* __s) const</a>
|
||
|
<a name="3392"><span class="lineNum"> 3392 </span> : : {</a>
|
||
|
<a name="3393"><span class="lineNum"> 3393 </span> : : if (__pos > this->size())</a>
|
||
|
<a name="3394"><span class="lineNum"> 3394 </span> : : __throw_out_of_range_fmt(__N("%s: __pos (which is %zu) > "</a>
|
||
|
<a name="3395"><span class="lineNum"> 3395 </span> : : "this->size() (which is %zu)"),</a>
|
||
|
<a name="3396"><span class="lineNum"> 3396 </span> : : __s, __pos, this->size());</a>
|
||
|
<a name="3397"><span class="lineNum"> 3397 </span> : : return __pos;</a>
|
||
|
<a name="3398"><span class="lineNum"> 3398 </span> : : }</a>
|
||
|
<a name="3399"><span class="lineNum"> 3399 </span> : : </a>
|
||
|
<a name="3400"><span class="lineNum"> 3400 </span> : : void</a>
|
||
|
<a name="3401"><span class="lineNum"> 3401 </span> : : _M_check_length(size_type __n1, size_type __n2, const char* __s) const</a>
|
||
|
<a name="3402"><span class="lineNum"> 3402 </span> : : {</a>
|
||
|
<a name="3403"><span class="lineNum"> 3403 </span> : : if (this->max_size() - (this->size() - __n1) < __n2)</a>
|
||
|
<a name="3404"><span class="lineNum"> 3404 </span> : : __throw_length_error(__N(__s));</a>
|
||
|
<a name="3405"><span class="lineNum"> 3405 </span> : : }</a>
|
||
|
<a name="3406"><span class="lineNum"> 3406 </span> : : </a>
|
||
|
<a name="3407"><span class="lineNum"> 3407 </span> : : // NB: _M_limit doesn't check for a bad __pos value.</a>
|
||
|
<a name="3408"><span class="lineNum"> 3408 </span> : : size_type</a>
|
||
|
<a name="3409"><span class="lineNum"> 3409 </span> : : _M_limit(size_type __pos, size_type __off) const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3410"><span class="lineNum"> 3410 </span> : : {</a>
|
||
|
<a name="3411"><span class="lineNum"> 3411 </span> : : const bool __testoff = __off < this->size() - __pos;</a>
|
||
|
<a name="3412"><span class="lineNum"> 3412 </span> : : return __testoff ? __off : this->size() - __pos;</a>
|
||
|
<a name="3413"><span class="lineNum"> 3413 </span> : : }</a>
|
||
|
<a name="3414"><span class="lineNum"> 3414 </span> : : </a>
|
||
|
<a name="3415"><span class="lineNum"> 3415 </span> : : // True if _Rep and source do not overlap.</a>
|
||
|
<a name="3416"><span class="lineNum"> 3416 </span> : : bool</a>
|
||
|
<a name="3417"><span class="lineNum"> 3417 </span> : : _M_disjunct(const _CharT* __s) const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3418"><span class="lineNum"> 3418 </span> : : {</a>
|
||
|
<a name="3419"><span class="lineNum"> 3419 </span> : : return (less<const _CharT*>()(__s, _M_data())</a>
|
||
|
<a name="3420"><span class="lineNum"> 3420 </span> : : || less<const _CharT*>()(_M_data() + this->size(), __s));</a>
|
||
|
<a name="3421"><span class="lineNum"> 3421 </span> : : }</a>
|
||
|
<a name="3422"><span class="lineNum"> 3422 </span> : : </a>
|
||
|
<a name="3423"><span class="lineNum"> 3423 </span> : : // When __n = 1 way faster than the general multichar</a>
|
||
|
<a name="3424"><span class="lineNum"> 3424 </span> : : // traits_type::copy/move/assign.</a>
|
||
|
<a name="3425"><span class="lineNum"> 3425 </span> : : static void</a>
|
||
|
<a name="3426"><span class="lineNum"> 3426 </span> : : _M_copy(_CharT* __d, const _CharT* __s, size_type __n) _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3427"><span class="lineNum"> 3427 </span> : : {</a>
|
||
|
<a name="3428"><span class="lineNum"> 3428 </span> : : if (__n == 1)</a>
|
||
|
<a name="3429"><span class="lineNum"> 3429 </span> : : traits_type::assign(*__d, *__s);</a>
|
||
|
<a name="3430"><span class="lineNum"> 3430 </span> : : else</a>
|
||
|
<a name="3431"><span class="lineNum"> 3431 </span> : : traits_type::copy(__d, __s, __n);</a>
|
||
|
<a name="3432"><span class="lineNum"> 3432 </span> : : }</a>
|
||
|
<a name="3433"><span class="lineNum"> 3433 </span> : : </a>
|
||
|
<a name="3434"><span class="lineNum"> 3434 </span> : : static void</a>
|
||
|
<a name="3435"><span class="lineNum"> 3435 </span> : : _M_move(_CharT* __d, const _CharT* __s, size_type __n) _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3436"><span class="lineNum"> 3436 </span> : : {</a>
|
||
|
<a name="3437"><span class="lineNum"> 3437 </span> : : if (__n == 1)</a>
|
||
|
<a name="3438"><span class="lineNum"> 3438 </span> : : traits_type::assign(*__d, *__s);</a>
|
||
|
<a name="3439"><span class="lineNum"> 3439 </span> : : else</a>
|
||
|
<a name="3440"><span class="lineNum"> 3440 </span> : : traits_type::move(__d, __s, __n); </a>
|
||
|
<a name="3441"><span class="lineNum"> 3441 </span> : : }</a>
|
||
|
<a name="3442"><span class="lineNum"> 3442 </span> : : </a>
|
||
|
<a name="3443"><span class="lineNum"> 3443 </span> : : static void</a>
|
||
|
<a name="3444"><span class="lineNum"> 3444 </span> : : _M_assign(_CharT* __d, size_type __n, _CharT __c) _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3445"><span class="lineNum"> 3445 </span> : : {</a>
|
||
|
<a name="3446"><span class="lineNum"> 3446 </span> : : if (__n == 1)</a>
|
||
|
<a name="3447"><span class="lineNum"> 3447 </span> : : traits_type::assign(*__d, __c);</a>
|
||
|
<a name="3448"><span class="lineNum"> 3448 </span> : : else</a>
|
||
|
<a name="3449"><span class="lineNum"> 3449 </span> : : traits_type::assign(__d, __n, __c); </a>
|
||
|
<a name="3450"><span class="lineNum"> 3450 </span> : : }</a>
|
||
|
<a name="3451"><span class="lineNum"> 3451 </span> : : </a>
|
||
|
<a name="3452"><span class="lineNum"> 3452 </span> : : // _S_copy_chars is a separate template to permit specialization</a>
|
||
|
<a name="3453"><span class="lineNum"> 3453 </span> : : // to optimize for the common case of pointers as iterators.</a>
|
||
|
<a name="3454"><span class="lineNum"> 3454 </span> : : template<class _Iterator></a>
|
||
|
<a name="3455"><span class="lineNum"> 3455 </span> : : static void</a>
|
||
|
<a name="3456"><span class="lineNum"> 3456 </span> : : _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2)</a>
|
||
|
<a name="3457"><span class="lineNum"> 3457 </span> : : {</a>
|
||
|
<a name="3458"><span class="lineNum"> 3458 </span> : : for (; __k1 != __k2; ++__k1, (void)++__p)</a>
|
||
|
<a name="3459"><span class="lineNum"> 3459 </span> : : traits_type::assign(*__p, *__k1); // These types are off.</a>
|
||
|
<a name="3460"><span class="lineNum"> 3460 </span> : : }</a>
|
||
|
<a name="3461"><span class="lineNum"> 3461 </span> : : </a>
|
||
|
<a name="3462"><span class="lineNum"> 3462 </span> : : static void</a>
|
||
|
<a name="3463"><span class="lineNum"> 3463 </span> : : _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3464"><span class="lineNum"> 3464 </span> : : { _S_copy_chars(__p, __k1.base(), __k2.base()); }</a>
|
||
|
<a name="3465"><span class="lineNum"> 3465 </span> : : </a>
|
||
|
<a name="3466"><span class="lineNum"> 3466 </span> : : static void</a>
|
||
|
<a name="3467"><span class="lineNum"> 3467 </span> : : _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2)</a>
|
||
|
<a name="3468"><span class="lineNum"> 3468 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3469"><span class="lineNum"> 3469 </span> : : { _S_copy_chars(__p, __k1.base(), __k2.base()); }</a>
|
||
|
<a name="3470"><span class="lineNum"> 3470 </span> : : </a>
|
||
|
<a name="3471"><span class="lineNum"> 3471 </span> : : static void</a>
|
||
|
<a name="3472"><span class="lineNum"> 3472 </span> : : _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3473"><span class="lineNum"> 3473 </span> : : { _M_copy(__p, __k1, __k2 - __k1); }</a>
|
||
|
<a name="3474"><span class="lineNum"> 3474 </span> : : </a>
|
||
|
<a name="3475"><span class="lineNum"> 3475 </span> : : static void</a>
|
||
|
<a name="3476"><span class="lineNum"> 3476 </span> : : _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2)</a>
|
||
|
<a name="3477"><span class="lineNum"> 3477 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3478"><span class="lineNum"> 3478 </span> : : { _M_copy(__p, __k1, __k2 - __k1); }</a>
|
||
|
<a name="3479"><span class="lineNum"> 3479 </span> : : </a>
|
||
|
<a name="3480"><span class="lineNum"> 3480 </span> : : static int</a>
|
||
|
<a name="3481"><span class="lineNum"> 3481 </span> : : _S_compare(size_type __n1, size_type __n2) _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3482"><span class="lineNum"> 3482 </span> : : {</a>
|
||
|
<a name="3483"><span class="lineNum"> 3483 </span> : : const difference_type __d = difference_type(__n1 - __n2);</a>
|
||
|
<a name="3484"><span class="lineNum"> 3484 </span> : : </a>
|
||
|
<a name="3485"><span class="lineNum"> 3485 </span> : : if (__d > __gnu_cxx::__numeric_traits<int>::__max)</a>
|
||
|
<a name="3486"><span class="lineNum"> 3486 </span> : : return __gnu_cxx::__numeric_traits<int>::__max;</a>
|
||
|
<a name="3487"><span class="lineNum"> 3487 </span> : : else if (__d < __gnu_cxx::__numeric_traits<int>::__min)</a>
|
||
|
<a name="3488"><span class="lineNum"> 3488 </span> : : return __gnu_cxx::__numeric_traits<int>::__min;</a>
|
||
|
<a name="3489"><span class="lineNum"> 3489 </span> : : else</a>
|
||
|
<a name="3490"><span class="lineNum"> 3490 </span> : : return int(__d);</a>
|
||
|
<a name="3491"><span class="lineNum"> 3491 </span> : : }</a>
|
||
|
<a name="3492"><span class="lineNum"> 3492 </span> : : </a>
|
||
|
<a name="3493"><span class="lineNum"> 3493 </span> : : void</a>
|
||
|
<a name="3494"><span class="lineNum"> 3494 </span> : : _M_mutate(size_type __pos, size_type __len1, size_type __len2);</a>
|
||
|
<a name="3495"><span class="lineNum"> 3495 </span> : : </a>
|
||
|
<a name="3496"><span class="lineNum"> 3496 </span> : : void</a>
|
||
|
<a name="3497"><span class="lineNum"> 3497 </span> : : _M_leak_hard();</a>
|
||
|
<a name="3498"><span class="lineNum"> 3498 </span> : : </a>
|
||
|
<a name="3499"><span class="lineNum"> 3499 </span> : : static _Rep&</a>
|
||
|
<a name="3500"><span class="lineNum"> 3500 </span> : : _S_empty_rep() _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3501"><span class="lineNum"> 3501 </span> : : { return _Rep::_S_empty_rep(); }</a>
|
||
|
<a name="3502"><span class="lineNum"> 3502 </span> : : </a>
|
||
|
<a name="3503"><span class="lineNum"> 3503 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="3504"><span class="lineNum"> 3504 </span> : : // A helper type for avoiding boiler-plate.</a>
|
||
|
<a name="3505"><span class="lineNum"> 3505 </span> : : typedef basic_string_view<_CharT, _Traits> __sv_type;</a>
|
||
|
<a name="3506"><span class="lineNum"> 3506 </span> : : </a>
|
||
|
<a name="3507"><span class="lineNum"> 3507 </span> : : template<typename _Tp, typename _Res></a>
|
||
|
<a name="3508"><span class="lineNum"> 3508 </span> : : using _If_sv = enable_if_t<</a>
|
||
|
<a name="3509"><span class="lineNum"> 3509 </span> : : __and_<is_convertible<const _Tp&, __sv_type>,</a>
|
||
|
<a name="3510"><span class="lineNum"> 3510 </span> : : __not_<is_convertible<const _Tp*, const basic_string*>>,</a>
|
||
|
<a name="3511"><span class="lineNum"> 3511 </span> : : __not_<is_convertible<const _Tp&, const _CharT*>>>::value,</a>
|
||
|
<a name="3512"><span class="lineNum"> 3512 </span> : : _Res>;</a>
|
||
|
<a name="3513"><span class="lineNum"> 3513 </span> : : </a>
|
||
|
<a name="3514"><span class="lineNum"> 3514 </span> : : // Allows an implicit conversion to __sv_type.</a>
|
||
|
<a name="3515"><span class="lineNum"> 3515 </span> : : static __sv_type</a>
|
||
|
<a name="3516"><span class="lineNum"> 3516 </span> : : _S_to_string_view(__sv_type __svt) noexcept</a>
|
||
|
<a name="3517"><span class="lineNum"> 3517 </span> : : { return __svt; }</a>
|
||
|
<a name="3518"><span class="lineNum"> 3518 </span> : : </a>
|
||
|
<a name="3519"><span class="lineNum"> 3519 </span> : : // Wraps a string_view by explicit conversion and thus</a>
|
||
|
<a name="3520"><span class="lineNum"> 3520 </span> : : // allows to add an internal constructor that does not</a>
|
||
|
<a name="3521"><span class="lineNum"> 3521 </span> : : // participate in overload resolution when a string_view</a>
|
||
|
<a name="3522"><span class="lineNum"> 3522 </span> : : // is provided.</a>
|
||
|
<a name="3523"><span class="lineNum"> 3523 </span> : : struct __sv_wrapper</a>
|
||
|
<a name="3524"><span class="lineNum"> 3524 </span> : : {</a>
|
||
|
<a name="3525"><span class="lineNum"> 3525 </span> : : explicit __sv_wrapper(__sv_type __sv) noexcept : _M_sv(__sv) { }</a>
|
||
|
<a name="3526"><span class="lineNum"> 3526 </span> : : __sv_type _M_sv;</a>
|
||
|
<a name="3527"><span class="lineNum"> 3527 </span> : : };</a>
|
||
|
<a name="3528"><span class="lineNum"> 3528 </span> : : </a>
|
||
|
<a name="3529"><span class="lineNum"> 3529 </span> : : /**</a>
|
||
|
<a name="3530"><span class="lineNum"> 3530 </span> : : * @brief Only internally used: Construct string from a string view</a>
|
||
|
<a name="3531"><span class="lineNum"> 3531 </span> : : * wrapper.</a>
|
||
|
<a name="3532"><span class="lineNum"> 3532 </span> : : * @param __svw string view wrapper.</a>
|
||
|
<a name="3533"><span class="lineNum"> 3533 </span> : : * @param __a Allocator to use.</a>
|
||
|
<a name="3534"><span class="lineNum"> 3534 </span> : : */</a>
|
||
|
<a name="3535"><span class="lineNum"> 3535 </span> : : explicit</a>
|
||
|
<a name="3536"><span class="lineNum"> 3536 </span> : : basic_string(__sv_wrapper __svw, const _Alloc& __a)</a>
|
||
|
<a name="3537"><span class="lineNum"> 3537 </span> : : : basic_string(__svw._M_sv.data(), __svw._M_sv.size(), __a) { }</a>
|
||
|
<a name="3538"><span class="lineNum"> 3538 </span> : : #endif</a>
|
||
|
<a name="3539"><span class="lineNum"> 3539 </span> : : </a>
|
||
|
<a name="3540"><span class="lineNum"> 3540 </span> : : public:</a>
|
||
|
<a name="3541"><span class="lineNum"> 3541 </span> : : // Construct/copy/destroy:</a>
|
||
|
<a name="3542"><span class="lineNum"> 3542 </span> : : // NB: We overload ctors in some cases instead of using default</a>
|
||
|
<a name="3543"><span class="lineNum"> 3543 </span> : : // arguments, per 17.4.4.4 para. 2 item 2.</a>
|
||
|
<a name="3544"><span class="lineNum"> 3544 </span> : : </a>
|
||
|
<a name="3545"><span class="lineNum"> 3545 </span> : : /**</a>
|
||
|
<a name="3546"><span class="lineNum"> 3546 </span> : : * @brief Default constructor creates an empty string.</a>
|
||
|
<a name="3547"><span class="lineNum"> 3547 </span> : : */</a>
|
||
|
<a name="3548"><span class="lineNum"> 3548 </span> : : basic_string()</a>
|
||
|
<a name="3549"><span class="lineNum"> 3549 </span> : : #if _GLIBCXX_FULLY_DYNAMIC_STRING == 0</a>
|
||
|
<a name="3550"><span class="lineNum"> 3550 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3551"><span class="lineNum"> 3551 </span> : : : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc())</a>
|
||
|
<a name="3552"><span class="lineNum"> 3552 </span> : : #else</a>
|
||
|
<a name="3553"><span class="lineNum"> 3553 </span> : : : _M_dataplus(_S_construct(size_type(), _CharT(), _Alloc()), _Alloc())</a>
|
||
|
<a name="3554"><span class="lineNum"> 3554 </span> : : #endif</a>
|
||
|
<a name="3555"><span class="lineNum"> 3555 </span> : : { }</a>
|
||
|
<a name="3556"><span class="lineNum"> 3556 </span> : : </a>
|
||
|
<a name="3557"><span class="lineNum"> 3557 </span> : : /**</a>
|
||
|
<a name="3558"><span class="lineNum"> 3558 </span> : : * @brief Construct an empty string using allocator @a a.</a>
|
||
|
<a name="3559"><span class="lineNum"> 3559 </span> : : */</a>
|
||
|
<a name="3560"><span class="lineNum"> 3560 </span> : : explicit</a>
|
||
|
<a name="3561"><span class="lineNum"> 3561 </span> : : basic_string(const _Alloc& __a);</a>
|
||
|
<a name="3562"><span class="lineNum"> 3562 </span> : : </a>
|
||
|
<a name="3563"><span class="lineNum"> 3563 </span> : : // NB: per LWG issue 42, semantics different from IS:</a>
|
||
|
<a name="3564"><span class="lineNum"> 3564 </span> : : /**</a>
|
||
|
<a name="3565"><span class="lineNum"> 3565 </span> : : * @brief Construct string with copy of value of @a str.</a>
|
||
|
<a name="3566"><span class="lineNum"> 3566 </span> : : * @param __str Source string.</a>
|
||
|
<a name="3567"><span class="lineNum"> 3567 </span> : : */</a>
|
||
|
<a name="3568"><span class="lineNum"> 3568 </span> : : basic_string(const basic_string& __str);</a>
|
||
|
<a name="3569"><span class="lineNum"> 3569 </span> : : </a>
|
||
|
<a name="3570"><span class="lineNum"> 3570 </span> : : // _GLIBCXX_RESOLVE_LIB_DEFECTS</a>
|
||
|
<a name="3571"><span class="lineNum"> 3571 </span> : : // 2583. no way to supply an allocator for basic_string(str, pos)</a>
|
||
|
<a name="3572"><span class="lineNum"> 3572 </span> : : /**</a>
|
||
|
<a name="3573"><span class="lineNum"> 3573 </span> : : * @brief Construct string as copy of a substring.</a>
|
||
|
<a name="3574"><span class="lineNum"> 3574 </span> : : * @param __str Source string.</a>
|
||
|
<a name="3575"><span class="lineNum"> 3575 </span> : : * @param __pos Index of first character to copy from.</a>
|
||
|
<a name="3576"><span class="lineNum"> 3576 </span> : : * @param __a Allocator to use.</a>
|
||
|
<a name="3577"><span class="lineNum"> 3577 </span> : : */</a>
|
||
|
<a name="3578"><span class="lineNum"> 3578 </span> : : basic_string(const basic_string& __str, size_type __pos,</a>
|
||
|
<a name="3579"><span class="lineNum"> 3579 </span> : : const _Alloc& __a = _Alloc());</a>
|
||
|
<a name="3580"><span class="lineNum"> 3580 </span> : : </a>
|
||
|
<a name="3581"><span class="lineNum"> 3581 </span> : : /**</a>
|
||
|
<a name="3582"><span class="lineNum"> 3582 </span> : : * @brief Construct string as copy of a substring.</a>
|
||
|
<a name="3583"><span class="lineNum"> 3583 </span> : : * @param __str Source string.</a>
|
||
|
<a name="3584"><span class="lineNum"> 3584 </span> : : * @param __pos Index of first character to copy from.</a>
|
||
|
<a name="3585"><span class="lineNum"> 3585 </span> : : * @param __n Number of characters to copy.</a>
|
||
|
<a name="3586"><span class="lineNum"> 3586 </span> : : */</a>
|
||
|
<a name="3587"><span class="lineNum"> 3587 </span> : : basic_string(const basic_string& __str, size_type __pos,</a>
|
||
|
<a name="3588"><span class="lineNum"> 3588 </span> : : size_type __n);</a>
|
||
|
<a name="3589"><span class="lineNum"> 3589 </span> : : /**</a>
|
||
|
<a name="3590"><span class="lineNum"> 3590 </span> : : * @brief Construct string as copy of a substring.</a>
|
||
|
<a name="3591"><span class="lineNum"> 3591 </span> : : * @param __str Source string.</a>
|
||
|
<a name="3592"><span class="lineNum"> 3592 </span> : : * @param __pos Index of first character to copy from.</a>
|
||
|
<a name="3593"><span class="lineNum"> 3593 </span> : : * @param __n Number of characters to copy.</a>
|
||
|
<a name="3594"><span class="lineNum"> 3594 </span> : : * @param __a Allocator to use.</a>
|
||
|
<a name="3595"><span class="lineNum"> 3595 </span> : : */</a>
|
||
|
<a name="3596"><span class="lineNum"> 3596 </span> : : basic_string(const basic_string& __str, size_type __pos,</a>
|
||
|
<a name="3597"><span class="lineNum"> 3597 </span> : : size_type __n, const _Alloc& __a);</a>
|
||
|
<a name="3598"><span class="lineNum"> 3598 </span> : : </a>
|
||
|
<a name="3599"><span class="lineNum"> 3599 </span> : : /**</a>
|
||
|
<a name="3600"><span class="lineNum"> 3600 </span> : : * @brief Construct string initialized by a character %array.</a>
|
||
|
<a name="3601"><span class="lineNum"> 3601 </span> : : * @param __s Source character %array.</a>
|
||
|
<a name="3602"><span class="lineNum"> 3602 </span> : : * @param __n Number of characters to copy.</a>
|
||
|
<a name="3603"><span class="lineNum"> 3603 </span> : : * @param __a Allocator to use (default is default allocator).</a>
|
||
|
<a name="3604"><span class="lineNum"> 3604 </span> : : *</a>
|
||
|
<a name="3605"><span class="lineNum"> 3605 </span> : : * NB: @a __s must have at least @a __n characters, &apos;\\0&apos;</a>
|
||
|
<a name="3606"><span class="lineNum"> 3606 </span> : : * has no special meaning.</a>
|
||
|
<a name="3607"><span class="lineNum"> 3607 </span> : : */</a>
|
||
|
<a name="3608"><span class="lineNum"> 3608 </span> : : basic_string(const _CharT* __s, size_type __n,</a>
|
||
|
<a name="3609"><span class="lineNum"> 3609 </span> : : const _Alloc& __a = _Alloc());</a>
|
||
|
<a name="3610"><span class="lineNum"> 3610 </span> : : /**</a>
|
||
|
<a name="3611"><span class="lineNum"> 3611 </span> : : * @brief Construct string as copy of a C string.</a>
|
||
|
<a name="3612"><span class="lineNum"> 3612 </span> : : * @param __s Source C string.</a>
|
||
|
<a name="3613"><span class="lineNum"> 3613 </span> : : * @param __a Allocator to use (default is default allocator).</a>
|
||
|
<a name="3614"><span class="lineNum"> 3614 </span> : : */</a>
|
||
|
<a name="3615"><span class="lineNum"> 3615 </span> : : basic_string(const _CharT* __s, const _Alloc& __a = _Alloc());</a>
|
||
|
<a name="3616"><span class="lineNum"> 3616 </span> : : /**</a>
|
||
|
<a name="3617"><span class="lineNum"> 3617 </span> : : * @brief Construct string as multiple characters.</a>
|
||
|
<a name="3618"><span class="lineNum"> 3618 </span> : : * @param __n Number of characters.</a>
|
||
|
<a name="3619"><span class="lineNum"> 3619 </span> : : * @param __c Character to use.</a>
|
||
|
<a name="3620"><span class="lineNum"> 3620 </span> : : * @param __a Allocator to use (default is default allocator).</a>
|
||
|
<a name="3621"><span class="lineNum"> 3621 </span> : : */</a>
|
||
|
<a name="3622"><span class="lineNum"> 3622 </span> : : basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc());</a>
|
||
|
<a name="3623"><span class="lineNum"> 3623 </span> : : </a>
|
||
|
<a name="3624"><span class="lineNum"> 3624 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="3625"><span class="lineNum"> 3625 </span> : : /**</a>
|
||
|
<a name="3626"><span class="lineNum"> 3626 </span> : : * @brief Move construct string.</a>
|
||
|
<a name="3627"><span class="lineNum"> 3627 </span> : : * @param __str Source string.</a>
|
||
|
<a name="3628"><span class="lineNum"> 3628 </span> : : *</a>
|
||
|
<a name="3629"><span class="lineNum"> 3629 </span> : : * The newly-created string contains the exact contents of @a __str.</a>
|
||
|
<a name="3630"><span class="lineNum"> 3630 </span> : : * @a __str is a valid, but unspecified string.</a>
|
||
|
<a name="3631"><span class="lineNum"> 3631 </span> : : **/</a>
|
||
|
<a name="3632"><span class="lineNum"> 3632 </span> : : basic_string(basic_string&& __str)</a>
|
||
|
<a name="3633"><span class="lineNum"> 3633 </span> : : #if _GLIBCXX_FULLY_DYNAMIC_STRING == 0</a>
|
||
|
<a name="3634"><span class="lineNum"> 3634 </span> : : noexcept // FIXME C++11: should always be noexcept.</a>
|
||
|
<a name="3635"><span class="lineNum"> 3635 </span> : : #endif</a>
|
||
|
<a name="3636"><span class="lineNum"> 3636 </span> : : : _M_dataplus(std::move(__str._M_dataplus))</a>
|
||
|
<a name="3637"><span class="lineNum"> 3637 </span> : : {</a>
|
||
|
<a name="3638"><span class="lineNum"> 3638 </span> : : #if _GLIBCXX_FULLY_DYNAMIC_STRING == 0</a>
|
||
|
<a name="3639"><span class="lineNum"> 3639 </span> : : __str._M_data(_S_empty_rep()._M_refdata());</a>
|
||
|
<a name="3640"><span class="lineNum"> 3640 </span> : : #else</a>
|
||
|
<a name="3641"><span class="lineNum"> 3641 </span> : : __str._M_data(_S_construct(size_type(), _CharT(), get_allocator()));</a>
|
||
|
<a name="3642"><span class="lineNum"> 3642 </span> : : #endif</a>
|
||
|
<a name="3643"><span class="lineNum"> 3643 </span> : : }</a>
|
||
|
<a name="3644"><span class="lineNum"> 3644 </span> : : </a>
|
||
|
<a name="3645"><span class="lineNum"> 3645 </span> : : /**</a>
|
||
|
<a name="3646"><span class="lineNum"> 3646 </span> : : * @brief Construct string from an initializer %list.</a>
|
||
|
<a name="3647"><span class="lineNum"> 3647 </span> : : * @param __l std::initializer_list of characters.</a>
|
||
|
<a name="3648"><span class="lineNum"> 3648 </span> : : * @param __a Allocator to use (default is default allocator).</a>
|
||
|
<a name="3649"><span class="lineNum"> 3649 </span> : : */</a>
|
||
|
<a name="3650"><span class="lineNum"> 3650 </span> : : basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc());</a>
|
||
|
<a name="3651"><span class="lineNum"> 3651 </span> : : </a>
|
||
|
<a name="3652"><span class="lineNum"> 3652 </span> : : basic_string(const basic_string& __str, const _Alloc& __a)</a>
|
||
|
<a name="3653"><span class="lineNum"> 3653 </span> : : : _M_dataplus(__str._M_rep()->_M_grab(__a, __str.get_allocator()), __a)</a>
|
||
|
<a name="3654"><span class="lineNum"> 3654 </span> : : { }</a>
|
||
|
<a name="3655"><span class="lineNum"> 3655 </span> : : </a>
|
||
|
<a name="3656"><span class="lineNum"> 3656 </span> : : basic_string(basic_string&& __str, const _Alloc& __a)</a>
|
||
|
<a name="3657"><span class="lineNum"> 3657 </span> : : : _M_dataplus(__str._M_data(), __a)</a>
|
||
|
<a name="3658"><span class="lineNum"> 3658 </span> : : {</a>
|
||
|
<a name="3659"><span class="lineNum"> 3659 </span> : : if (__a == __str.get_allocator())</a>
|
||
|
<a name="3660"><span class="lineNum"> 3660 </span> : : {</a>
|
||
|
<a name="3661"><span class="lineNum"> 3661 </span> : : #if _GLIBCXX_FULLY_DYNAMIC_STRING == 0</a>
|
||
|
<a name="3662"><span class="lineNum"> 3662 </span> : : __str._M_data(_S_empty_rep()._M_refdata());</a>
|
||
|
<a name="3663"><span class="lineNum"> 3663 </span> : : #else</a>
|
||
|
<a name="3664"><span class="lineNum"> 3664 </span> : : __str._M_data(_S_construct(size_type(), _CharT(), __a));</a>
|
||
|
<a name="3665"><span class="lineNum"> 3665 </span> : : #endif</a>
|
||
|
<a name="3666"><span class="lineNum"> 3666 </span> : : }</a>
|
||
|
<a name="3667"><span class="lineNum"> 3667 </span> : : else</a>
|
||
|
<a name="3668"><span class="lineNum"> 3668 </span> : : _M_dataplus._M_p = _S_construct(__str.begin(), __str.end(), __a);</a>
|
||
|
<a name="3669"><span class="lineNum"> 3669 </span> : : }</a>
|
||
|
<a name="3670"><span class="lineNum"> 3670 </span> : : #endif // C++11</a>
|
||
|
<a name="3671"><span class="lineNum"> 3671 </span> : : </a>
|
||
|
<a name="3672"><span class="lineNum"> 3672 </span> : : /**</a>
|
||
|
<a name="3673"><span class="lineNum"> 3673 </span> : : * @brief Construct string as copy of a range.</a>
|
||
|
<a name="3674"><span class="lineNum"> 3674 </span> : : * @param __beg Start of range.</a>
|
||
|
<a name="3675"><span class="lineNum"> 3675 </span> : : * @param __end End of range.</a>
|
||
|
<a name="3676"><span class="lineNum"> 3676 </span> : : * @param __a Allocator to use (default is default allocator).</a>
|
||
|
<a name="3677"><span class="lineNum"> 3677 </span> : : */</a>
|
||
|
<a name="3678"><span class="lineNum"> 3678 </span> : : template<class _InputIterator></a>
|
||
|
<a name="3679"><span class="lineNum"> 3679 </span> : : basic_string(_InputIterator __beg, _InputIterator __end,</a>
|
||
|
<a name="3680"><span class="lineNum"> 3680 </span> : : const _Alloc& __a = _Alloc());</a>
|
||
|
<a name="3681"><span class="lineNum"> 3681 </span> : : </a>
|
||
|
<a name="3682"><span class="lineNum"> 3682 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="3683"><span class="lineNum"> 3683 </span> : : /**</a>
|
||
|
<a name="3684"><span class="lineNum"> 3684 </span> : : * @brief Construct string from a substring of a string_view.</a>
|
||
|
<a name="3685"><span class="lineNum"> 3685 </span> : : * @param __t Source object convertible to string view.</a>
|
||
|
<a name="3686"><span class="lineNum"> 3686 </span> : : * @param __pos The index of the first character to copy from __t.</a>
|
||
|
<a name="3687"><span class="lineNum"> 3687 </span> : : * @param __n The number of characters to copy from __t.</a>
|
||
|
<a name="3688"><span class="lineNum"> 3688 </span> : : * @param __a Allocator to use.</a>
|
||
|
<a name="3689"><span class="lineNum"> 3689 </span> : : */</a>
|
||
|
<a name="3690"><span class="lineNum"> 3690 </span> : : template<typename _Tp, typename = _If_sv<_Tp, void>></a>
|
||
|
<a name="3691"><span class="lineNum"> 3691 </span> : : basic_string(const _Tp& __t, size_type __pos, size_type __n,</a>
|
||
|
<a name="3692"><span class="lineNum"> 3692 </span> : : const _Alloc& __a = _Alloc())</a>
|
||
|
<a name="3693"><span class="lineNum"> 3693 </span> : : : basic_string(_S_to_string_view(__t).substr(__pos, __n), __a) { }</a>
|
||
|
<a name="3694"><span class="lineNum"> 3694 </span> : : </a>
|
||
|
<a name="3695"><span class="lineNum"> 3695 </span> : : /**</a>
|
||
|
<a name="3696"><span class="lineNum"> 3696 </span> : : * @brief Construct string from a string_view.</a>
|
||
|
<a name="3697"><span class="lineNum"> 3697 </span> : : * @param __t Source object convertible to string view.</a>
|
||
|
<a name="3698"><span class="lineNum"> 3698 </span> : : * @param __a Allocator to use (default is default allocator).</a>
|
||
|
<a name="3699"><span class="lineNum"> 3699 </span> : : */</a>
|
||
|
<a name="3700"><span class="lineNum"> 3700 </span> : : template<typename _Tp, typename = _If_sv<_Tp, void>></a>
|
||
|
<a name="3701"><span class="lineNum"> 3701 </span> : : explicit</a>
|
||
|
<a name="3702"><span class="lineNum"> 3702 </span> : : basic_string(const _Tp& __t, const _Alloc& __a = _Alloc())</a>
|
||
|
<a name="3703"><span class="lineNum"> 3703 </span> : : : basic_string(__sv_wrapper(_S_to_string_view(__t)), __a) { }</a>
|
||
|
<a name="3704"><span class="lineNum"> 3704 </span> : : #endif // C++17</a>
|
||
|
<a name="3705"><span class="lineNum"> 3705 </span> : : </a>
|
||
|
<a name="3706"><span class="lineNum"> 3706 </span> : : /**</a>
|
||
|
<a name="3707"><span class="lineNum"> 3707 </span> : : * @brief Destroy the string instance.</a>
|
||
|
<a name="3708"><span class="lineNum"> 3708 </span> : : */</a>
|
||
|
<a name="3709"><span class="lineNum"> 3709 </span> : : ~basic_string() _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3710"><span class="lineNum"> 3710 </span> : : { _M_rep()->_M_dispose(this->get_allocator()); }</a>
|
||
|
<a name="3711"><span class="lineNum"> 3711 </span> : : </a>
|
||
|
<a name="3712"><span class="lineNum"> 3712 </span> : : /**</a>
|
||
|
<a name="3713"><span class="lineNum"> 3713 </span> : : * @brief Assign the value of @a str to this string.</a>
|
||
|
<a name="3714"><span class="lineNum"> 3714 </span> : : * @param __str Source string.</a>
|
||
|
<a name="3715"><span class="lineNum"> 3715 </span> : : */</a>
|
||
|
<a name="3716"><span class="lineNum"> 3716 </span> : : basic_string&</a>
|
||
|
<a name="3717"><span class="lineNum"> 3717 </span> : : operator=(const basic_string& __str)</a>
|
||
|
<a name="3718"><span class="lineNum"> 3718 </span> : : { return this->assign(__str); }</a>
|
||
|
<a name="3719"><span class="lineNum"> 3719 </span> : : </a>
|
||
|
<a name="3720"><span class="lineNum"> 3720 </span> : : /**</a>
|
||
|
<a name="3721"><span class="lineNum"> 3721 </span> : : * @brief Copy contents of @a s into this string.</a>
|
||
|
<a name="3722"><span class="lineNum"> 3722 </span> : : * @param __s Source null-terminated string.</a>
|
||
|
<a name="3723"><span class="lineNum"> 3723 </span> : : */</a>
|
||
|
<a name="3724"><span class="lineNum"> 3724 </span> : : basic_string&</a>
|
||
|
<a name="3725"><span class="lineNum"> 3725 </span> : : operator=(const _CharT* __s) </a>
|
||
|
<a name="3726"><span class="lineNum"> 3726 </span> : : { return this->assign(__s); }</a>
|
||
|
<a name="3727"><span class="lineNum"> 3727 </span> : : </a>
|
||
|
<a name="3728"><span class="lineNum"> 3728 </span> : : /**</a>
|
||
|
<a name="3729"><span class="lineNum"> 3729 </span> : : * @brief Set value to string of length 1.</a>
|
||
|
<a name="3730"><span class="lineNum"> 3730 </span> : : * @param __c Source character.</a>
|
||
|
<a name="3731"><span class="lineNum"> 3731 </span> : : *</a>
|
||
|
<a name="3732"><span class="lineNum"> 3732 </span> : : * Assigning to a character makes this string length 1 and</a>
|
||
|
<a name="3733"><span class="lineNum"> 3733 </span> : : * (*this)[0] == @a c.</a>
|
||
|
<a name="3734"><span class="lineNum"> 3734 </span> : : */</a>
|
||
|
<a name="3735"><span class="lineNum"> 3735 </span> : : basic_string&</a>
|
||
|
<a name="3736"><span class="lineNum"> 3736 </span> : : operator=(_CharT __c) </a>
|
||
|
<a name="3737"><span class="lineNum"> 3737 </span> : : { </a>
|
||
|
<a name="3738"><span class="lineNum"> 3738 </span> : : this->assign(1, __c); </a>
|
||
|
<a name="3739"><span class="lineNum"> 3739 </span> : : return *this;</a>
|
||
|
<a name="3740"><span class="lineNum"> 3740 </span> : : }</a>
|
||
|
<a name="3741"><span class="lineNum"> 3741 </span> : : </a>
|
||
|
<a name="3742"><span class="lineNum"> 3742 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="3743"><span class="lineNum"> 3743 </span> : : /**</a>
|
||
|
<a name="3744"><span class="lineNum"> 3744 </span> : : * @brief Move assign the value of @a str to this string.</a>
|
||
|
<a name="3745"><span class="lineNum"> 3745 </span> : : * @param __str Source string.</a>
|
||
|
<a name="3746"><span class="lineNum"> 3746 </span> : : *</a>
|
||
|
<a name="3747"><span class="lineNum"> 3747 </span> : : * The contents of @a str are moved into this string (without copying).</a>
|
||
|
<a name="3748"><span class="lineNum"> 3748 </span> : : * @a str is a valid, but unspecified string.</a>
|
||
|
<a name="3749"><span class="lineNum"> 3749 </span> : : **/</a>
|
||
|
<a name="3750"><span class="lineNum"> 3750 </span> : : basic_string&</a>
|
||
|
<a name="3751"><span class="lineNum"> 3751 </span> : : operator=(basic_string&& __str)</a>
|
||
|
<a name="3752"><span class="lineNum"> 3752 </span> : : _GLIBCXX_NOEXCEPT_IF(allocator_traits<_Alloc>::is_always_equal::value)</a>
|
||
|
<a name="3753"><span class="lineNum"> 3753 </span> : : {</a>
|
||
|
<a name="3754"><span class="lineNum"> 3754 </span> : : // NB: DR 1204.</a>
|
||
|
<a name="3755"><span class="lineNum"> 3755 </span> : : this->swap(__str);</a>
|
||
|
<a name="3756"><span class="lineNum"> 3756 </span> : : return *this;</a>
|
||
|
<a name="3757"><span class="lineNum"> 3757 </span> : : }</a>
|
||
|
<a name="3758"><span class="lineNum"> 3758 </span> : : </a>
|
||
|
<a name="3759"><span class="lineNum"> 3759 </span> : : /**</a>
|
||
|
<a name="3760"><span class="lineNum"> 3760 </span> : : * @brief Set value to string constructed from initializer %list.</a>
|
||
|
<a name="3761"><span class="lineNum"> 3761 </span> : : * @param __l std::initializer_list.</a>
|
||
|
<a name="3762"><span class="lineNum"> 3762 </span> : : */</a>
|
||
|
<a name="3763"><span class="lineNum"> 3763 </span> : : basic_string&</a>
|
||
|
<a name="3764"><span class="lineNum"> 3764 </span> : : operator=(initializer_list<_CharT> __l)</a>
|
||
|
<a name="3765"><span class="lineNum"> 3765 </span> : : {</a>
|
||
|
<a name="3766"><span class="lineNum"> 3766 </span> : : this->assign(__l.begin(), __l.size());</a>
|
||
|
<a name="3767"><span class="lineNum"> 3767 </span> : : return *this;</a>
|
||
|
<a name="3768"><span class="lineNum"> 3768 </span> : : }</a>
|
||
|
<a name="3769"><span class="lineNum"> 3769 </span> : : #endif // C++11</a>
|
||
|
<a name="3770"><span class="lineNum"> 3770 </span> : : </a>
|
||
|
<a name="3771"><span class="lineNum"> 3771 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="3772"><span class="lineNum"> 3772 </span> : : /**</a>
|
||
|
<a name="3773"><span class="lineNum"> 3773 </span> : : * @brief Set value to string constructed from a string_view.</a>
|
||
|
<a name="3774"><span class="lineNum"> 3774 </span> : : * @param __svt An object convertible to string_view.</a>
|
||
|
<a name="3775"><span class="lineNum"> 3775 </span> : : */</a>
|
||
|
<a name="3776"><span class="lineNum"> 3776 </span> : : template<typename _Tp></a>
|
||
|
<a name="3777"><span class="lineNum"> 3777 </span> : : _If_sv<_Tp, basic_string&></a>
|
||
|
<a name="3778"><span class="lineNum"> 3778 </span> : : operator=(const _Tp& __svt)</a>
|
||
|
<a name="3779"><span class="lineNum"> 3779 </span> : : { return this->assign(__svt); }</a>
|
||
|
<a name="3780"><span class="lineNum"> 3780 </span> : : </a>
|
||
|
<a name="3781"><span class="lineNum"> 3781 </span> : : /**</a>
|
||
|
<a name="3782"><span class="lineNum"> 3782 </span> : : * @brief Convert to a string_view.</a>
|
||
|
<a name="3783"><span class="lineNum"> 3783 </span> : : * @return A string_view.</a>
|
||
|
<a name="3784"><span class="lineNum"> 3784 </span> : : */</a>
|
||
|
<a name="3785"><span class="lineNum"> 3785 </span> : : operator __sv_type() const noexcept</a>
|
||
|
<a name="3786"><span class="lineNum"> 3786 </span> : : { return __sv_type(data(), size()); }</a>
|
||
|
<a name="3787"><span class="lineNum"> 3787 </span> : : #endif // C++17</a>
|
||
|
<a name="3788"><span class="lineNum"> 3788 </span> : : </a>
|
||
|
<a name="3789"><span class="lineNum"> 3789 </span> : : // Iterators:</a>
|
||
|
<a name="3790"><span class="lineNum"> 3790 </span> : : /**</a>
|
||
|
<a name="3791"><span class="lineNum"> 3791 </span> : : * Returns a read/write iterator that points to the first character in</a>
|
||
|
<a name="3792"><span class="lineNum"> 3792 </span> : : * the %string. Unshares the string.</a>
|
||
|
<a name="3793"><span class="lineNum"> 3793 </span> : : */</a>
|
||
|
<a name="3794"><span class="lineNum"> 3794 </span> : : iterator</a>
|
||
|
<a name="3795"><span class="lineNum"> 3795 </span> : : begin() // FIXME C++11: should be noexcept.</a>
|
||
|
<a name="3796"><span class="lineNum"> 3796 </span> : : {</a>
|
||
|
<a name="3797"><span class="lineNum"> 3797 </span> : : _M_leak();</a>
|
||
|
<a name="3798"><span class="lineNum"> 3798 </span> : : return iterator(_M_data());</a>
|
||
|
<a name="3799"><span class="lineNum"> 3799 </span> : : }</a>
|
||
|
<a name="3800"><span class="lineNum"> 3800 </span> : : </a>
|
||
|
<a name="3801"><span class="lineNum"> 3801 </span> : : /**</a>
|
||
|
<a name="3802"><span class="lineNum"> 3802 </span> : : * Returns a read-only (constant) iterator that points to the first</a>
|
||
|
<a name="3803"><span class="lineNum"> 3803 </span> : : * character in the %string.</a>
|
||
|
<a name="3804"><span class="lineNum"> 3804 </span> : : */</a>
|
||
|
<a name="3805"><span class="lineNum"> 3805 </span> : : const_iterator</a>
|
||
|
<a name="3806"><span class="lineNum"> 3806 </span> : : begin() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3807"><span class="lineNum"> 3807 </span> : : { return const_iterator(_M_data()); }</a>
|
||
|
<a name="3808"><span class="lineNum"> 3808 </span> : : </a>
|
||
|
<a name="3809"><span class="lineNum"> 3809 </span> : : /**</a>
|
||
|
<a name="3810"><span class="lineNum"> 3810 </span> : : * Returns a read/write iterator that points one past the last</a>
|
||
|
<a name="3811"><span class="lineNum"> 3811 </span> : : * character in the %string. Unshares the string.</a>
|
||
|
<a name="3812"><span class="lineNum"> 3812 </span> : : */</a>
|
||
|
<a name="3813"><span class="lineNum"> 3813 </span> : : iterator</a>
|
||
|
<a name="3814"><span class="lineNum"> 3814 </span> : : end() // FIXME C++11: should be noexcept.</a>
|
||
|
<a name="3815"><span class="lineNum"> 3815 </span> : : {</a>
|
||
|
<a name="3816"><span class="lineNum"> 3816 </span> : : _M_leak();</a>
|
||
|
<a name="3817"><span class="lineNum"> 3817 </span> : : return iterator(_M_data() + this->size());</a>
|
||
|
<a name="3818"><span class="lineNum"> 3818 </span> : : }</a>
|
||
|
<a name="3819"><span class="lineNum"> 3819 </span> : : </a>
|
||
|
<a name="3820"><span class="lineNum"> 3820 </span> : : /**</a>
|
||
|
<a name="3821"><span class="lineNum"> 3821 </span> : : * Returns a read-only (constant) iterator that points one past the</a>
|
||
|
<a name="3822"><span class="lineNum"> 3822 </span> : : * last character in the %string.</a>
|
||
|
<a name="3823"><span class="lineNum"> 3823 </span> : : */</a>
|
||
|
<a name="3824"><span class="lineNum"> 3824 </span> : : const_iterator</a>
|
||
|
<a name="3825"><span class="lineNum"> 3825 </span> : : end() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3826"><span class="lineNum"> 3826 </span> : : { return const_iterator(_M_data() + this->size()); }</a>
|
||
|
<a name="3827"><span class="lineNum"> 3827 </span> : : </a>
|
||
|
<a name="3828"><span class="lineNum"> 3828 </span> : : /**</a>
|
||
|
<a name="3829"><span class="lineNum"> 3829 </span> : : * Returns a read/write reverse iterator that points to the last</a>
|
||
|
<a name="3830"><span class="lineNum"> 3830 </span> : : * character in the %string. Iteration is done in reverse element</a>
|
||
|
<a name="3831"><span class="lineNum"> 3831 </span> : : * order. Unshares the string.</a>
|
||
|
<a name="3832"><span class="lineNum"> 3832 </span> : : */</a>
|
||
|
<a name="3833"><span class="lineNum"> 3833 </span> : : reverse_iterator</a>
|
||
|
<a name="3834"><span class="lineNum"> 3834 </span> : : rbegin() // FIXME C++11: should be noexcept.</a>
|
||
|
<a name="3835"><span class="lineNum"> 3835 </span> : : { return reverse_iterator(this->end()); }</a>
|
||
|
<a name="3836"><span class="lineNum"> 3836 </span> : : </a>
|
||
|
<a name="3837"><span class="lineNum"> 3837 </span> : : /**</a>
|
||
|
<a name="3838"><span class="lineNum"> 3838 </span> : : * Returns a read-only (constant) reverse iterator that points</a>
|
||
|
<a name="3839"><span class="lineNum"> 3839 </span> : : * to the last character in the %string. Iteration is done in</a>
|
||
|
<a name="3840"><span class="lineNum"> 3840 </span> : : * reverse element order.</a>
|
||
|
<a name="3841"><span class="lineNum"> 3841 </span> : : */</a>
|
||
|
<a name="3842"><span class="lineNum"> 3842 </span> : : const_reverse_iterator</a>
|
||
|
<a name="3843"><span class="lineNum"> 3843 </span> : : rbegin() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3844"><span class="lineNum"> 3844 </span> : : { return const_reverse_iterator(this->end()); }</a>
|
||
|
<a name="3845"><span class="lineNum"> 3845 </span> : : </a>
|
||
|
<a name="3846"><span class="lineNum"> 3846 </span> : : /**</a>
|
||
|
<a name="3847"><span class="lineNum"> 3847 </span> : : * Returns a read/write reverse iterator that points to one before the</a>
|
||
|
<a name="3848"><span class="lineNum"> 3848 </span> : : * first character in the %string. Iteration is done in reverse</a>
|
||
|
<a name="3849"><span class="lineNum"> 3849 </span> : : * element order. Unshares the string.</a>
|
||
|
<a name="3850"><span class="lineNum"> 3850 </span> : : */</a>
|
||
|
<a name="3851"><span class="lineNum"> 3851 </span> : : reverse_iterator</a>
|
||
|
<a name="3852"><span class="lineNum"> 3852 </span> : : rend() // FIXME C++11: should be noexcept.</a>
|
||
|
<a name="3853"><span class="lineNum"> 3853 </span> : : { return reverse_iterator(this->begin()); }</a>
|
||
|
<a name="3854"><span class="lineNum"> 3854 </span> : : </a>
|
||
|
<a name="3855"><span class="lineNum"> 3855 </span> : : /**</a>
|
||
|
<a name="3856"><span class="lineNum"> 3856 </span> : : * Returns a read-only (constant) reverse iterator that points</a>
|
||
|
<a name="3857"><span class="lineNum"> 3857 </span> : : * to one before the first character in the %string. Iteration</a>
|
||
|
<a name="3858"><span class="lineNum"> 3858 </span> : : * is done in reverse element order.</a>
|
||
|
<a name="3859"><span class="lineNum"> 3859 </span> : : */</a>
|
||
|
<a name="3860"><span class="lineNum"> 3860 </span> : : const_reverse_iterator</a>
|
||
|
<a name="3861"><span class="lineNum"> 3861 </span> : : rend() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3862"><span class="lineNum"> 3862 </span> : : { return const_reverse_iterator(this->begin()); }</a>
|
||
|
<a name="3863"><span class="lineNum"> 3863 </span> : : </a>
|
||
|
<a name="3864"><span class="lineNum"> 3864 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="3865"><span class="lineNum"> 3865 </span> : : /**</a>
|
||
|
<a name="3866"><span class="lineNum"> 3866 </span> : : * Returns a read-only (constant) iterator that points to the first</a>
|
||
|
<a name="3867"><span class="lineNum"> 3867 </span> : : * character in the %string.</a>
|
||
|
<a name="3868"><span class="lineNum"> 3868 </span> : : */</a>
|
||
|
<a name="3869"><span class="lineNum"> 3869 </span> : : const_iterator</a>
|
||
|
<a name="3870"><span class="lineNum"> 3870 </span> : : cbegin() const noexcept</a>
|
||
|
<a name="3871"><span class="lineNum"> 3871 </span> : : { return const_iterator(this->_M_data()); }</a>
|
||
|
<a name="3872"><span class="lineNum"> 3872 </span> : : </a>
|
||
|
<a name="3873"><span class="lineNum"> 3873 </span> : : /**</a>
|
||
|
<a name="3874"><span class="lineNum"> 3874 </span> : : * Returns a read-only (constant) iterator that points one past the</a>
|
||
|
<a name="3875"><span class="lineNum"> 3875 </span> : : * last character in the %string.</a>
|
||
|
<a name="3876"><span class="lineNum"> 3876 </span> : : */</a>
|
||
|
<a name="3877"><span class="lineNum"> 3877 </span> : : const_iterator</a>
|
||
|
<a name="3878"><span class="lineNum"> 3878 </span> : : cend() const noexcept</a>
|
||
|
<a name="3879"><span class="lineNum"> 3879 </span> : : { return const_iterator(this->_M_data() + this->size()); }</a>
|
||
|
<a name="3880"><span class="lineNum"> 3880 </span> : : </a>
|
||
|
<a name="3881"><span class="lineNum"> 3881 </span> : : /**</a>
|
||
|
<a name="3882"><span class="lineNum"> 3882 </span> : : * Returns a read-only (constant) reverse iterator that points</a>
|
||
|
<a name="3883"><span class="lineNum"> 3883 </span> : : * to the last character in the %string. Iteration is done in</a>
|
||
|
<a name="3884"><span class="lineNum"> 3884 </span> : : * reverse element order.</a>
|
||
|
<a name="3885"><span class="lineNum"> 3885 </span> : : */</a>
|
||
|
<a name="3886"><span class="lineNum"> 3886 </span> : : const_reverse_iterator</a>
|
||
|
<a name="3887"><span class="lineNum"> 3887 </span> : : crbegin() const noexcept</a>
|
||
|
<a name="3888"><span class="lineNum"> 3888 </span> : : { return const_reverse_iterator(this->end()); }</a>
|
||
|
<a name="3889"><span class="lineNum"> 3889 </span> : : </a>
|
||
|
<a name="3890"><span class="lineNum"> 3890 </span> : : /**</a>
|
||
|
<a name="3891"><span class="lineNum"> 3891 </span> : : * Returns a read-only (constant) reverse iterator that points</a>
|
||
|
<a name="3892"><span class="lineNum"> 3892 </span> : : * to one before the first character in the %string. Iteration</a>
|
||
|
<a name="3893"><span class="lineNum"> 3893 </span> : : * is done in reverse element order.</a>
|
||
|
<a name="3894"><span class="lineNum"> 3894 </span> : : */</a>
|
||
|
<a name="3895"><span class="lineNum"> 3895 </span> : : const_reverse_iterator</a>
|
||
|
<a name="3896"><span class="lineNum"> 3896 </span> : : crend() const noexcept</a>
|
||
|
<a name="3897"><span class="lineNum"> 3897 </span> : : { return const_reverse_iterator(this->begin()); }</a>
|
||
|
<a name="3898"><span class="lineNum"> 3898 </span> : : #endif</a>
|
||
|
<a name="3899"><span class="lineNum"> 3899 </span> : : </a>
|
||
|
<a name="3900"><span class="lineNum"> 3900 </span> : : public:</a>
|
||
|
<a name="3901"><span class="lineNum"> 3901 </span> : : // Capacity:</a>
|
||
|
<a name="3902"><span class="lineNum"> 3902 </span> : : /// Returns the number of characters in the string, not including any</a>
|
||
|
<a name="3903"><span class="lineNum"> 3903 </span> : : /// null-termination.</a>
|
||
|
<a name="3904"><span class="lineNum"> 3904 </span> : : size_type</a>
|
||
|
<a name="3905"><span class="lineNum"> 3905 </span> : : size() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3906"><span class="lineNum"> 3906 </span> : : { return _M_rep()->_M_length; }</a>
|
||
|
<a name="3907"><span class="lineNum"> 3907 </span> : : </a>
|
||
|
<a name="3908"><span class="lineNum"> 3908 </span> : : /// Returns the number of characters in the string, not including any</a>
|
||
|
<a name="3909"><span class="lineNum"> 3909 </span> : : /// null-termination.</a>
|
||
|
<a name="3910"><span class="lineNum"> 3910 </span> : : size_type</a>
|
||
|
<a name="3911"><span class="lineNum"> 3911 </span> : : length() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3912"><span class="lineNum"> 3912 </span> : : { return _M_rep()->_M_length; }</a>
|
||
|
<a name="3913"><span class="lineNum"> 3913 </span> : : </a>
|
||
|
<a name="3914"><span class="lineNum"> 3914 </span> : : /// Returns the size() of the largest possible %string.</a>
|
||
|
<a name="3915"><span class="lineNum"> 3915 </span> : : size_type</a>
|
||
|
<a name="3916"><span class="lineNum"> 3916 </span> : : max_size() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3917"><span class="lineNum"> 3917 </span> : : { return _Rep::_S_max_size; }</a>
|
||
|
<a name="3918"><span class="lineNum"> 3918 </span> : : </a>
|
||
|
<a name="3919"><span class="lineNum"> 3919 </span> : : /**</a>
|
||
|
<a name="3920"><span class="lineNum"> 3920 </span> : : * @brief Resizes the %string to the specified number of characters.</a>
|
||
|
<a name="3921"><span class="lineNum"> 3921 </span> : : * @param __n Number of characters the %string should contain.</a>
|
||
|
<a name="3922"><span class="lineNum"> 3922 </span> : : * @param __c Character to fill any new elements.</a>
|
||
|
<a name="3923"><span class="lineNum"> 3923 </span> : : *</a>
|
||
|
<a name="3924"><span class="lineNum"> 3924 </span> : : * This function will %resize the %string to the specified</a>
|
||
|
<a name="3925"><span class="lineNum"> 3925 </span> : : * number of characters. If the number is smaller than the</a>
|
||
|
<a name="3926"><span class="lineNum"> 3926 </span> : : * %string's current size the %string is truncated, otherwise</a>
|
||
|
<a name="3927"><span class="lineNum"> 3927 </span> : : * the %string is extended and new elements are %set to @a __c.</a>
|
||
|
<a name="3928"><span class="lineNum"> 3928 </span> : : */</a>
|
||
|
<a name="3929"><span class="lineNum"> 3929 </span> : : void</a>
|
||
|
<a name="3930"><span class="lineNum"> 3930 </span> : : resize(size_type __n, _CharT __c);</a>
|
||
|
<a name="3931"><span class="lineNum"> 3931 </span> : : </a>
|
||
|
<a name="3932"><span class="lineNum"> 3932 </span> : : /**</a>
|
||
|
<a name="3933"><span class="lineNum"> 3933 </span> : : * @brief Resizes the %string to the specified number of characters.</a>
|
||
|
<a name="3934"><span class="lineNum"> 3934 </span> : : * @param __n Number of characters the %string should contain.</a>
|
||
|
<a name="3935"><span class="lineNum"> 3935 </span> : : *</a>
|
||
|
<a name="3936"><span class="lineNum"> 3936 </span> : : * This function will resize the %string to the specified length. If</a>
|
||
|
<a name="3937"><span class="lineNum"> 3937 </span> : : * the new size is smaller than the %string's current size the %string</a>
|
||
|
<a name="3938"><span class="lineNum"> 3938 </span> : : * is truncated, otherwise the %string is extended and new characters</a>
|
||
|
<a name="3939"><span class="lineNum"> 3939 </span> : : * are default-constructed. For basic types such as char, this means</a>
|
||
|
<a name="3940"><span class="lineNum"> 3940 </span> : : * setting them to 0.</a>
|
||
|
<a name="3941"><span class="lineNum"> 3941 </span> : : */</a>
|
||
|
<a name="3942"><span class="lineNum"> 3942 </span> : : void</a>
|
||
|
<a name="3943"><span class="lineNum"> 3943 </span> : : resize(size_type __n)</a>
|
||
|
<a name="3944"><span class="lineNum"> 3944 </span> : : { this->resize(__n, _CharT()); }</a>
|
||
|
<a name="3945"><span class="lineNum"> 3945 </span> : : </a>
|
||
|
<a name="3946"><span class="lineNum"> 3946 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="3947"><span class="lineNum"> 3947 </span> : : /// A non-binding request to reduce capacity() to size().</a>
|
||
|
<a name="3948"><span class="lineNum"> 3948 </span> : : void</a>
|
||
|
<a name="3949"><span class="lineNum"> 3949 </span> : : shrink_to_fit() _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3950"><span class="lineNum"> 3950 </span> : : {</a>
|
||
|
<a name="3951"><span class="lineNum"> 3951 </span> : : #if __cpp_exceptions</a>
|
||
|
<a name="3952"><span class="lineNum"> 3952 </span> : : if (capacity() > size())</a>
|
||
|
<a name="3953"><span class="lineNum"> 3953 </span> : : {</a>
|
||
|
<a name="3954"><span class="lineNum"> 3954 </span> : : try</a>
|
||
|
<a name="3955"><span class="lineNum"> 3955 </span> : : { reserve(0); }</a>
|
||
|
<a name="3956"><span class="lineNum"> 3956 </span> : : catch(...)</a>
|
||
|
<a name="3957"><span class="lineNum"> 3957 </span> : : { }</a>
|
||
|
<a name="3958"><span class="lineNum"> 3958 </span> : : }</a>
|
||
|
<a name="3959"><span class="lineNum"> 3959 </span> : : #endif</a>
|
||
|
<a name="3960"><span class="lineNum"> 3960 </span> : : }</a>
|
||
|
<a name="3961"><span class="lineNum"> 3961 </span> : : #endif</a>
|
||
|
<a name="3962"><span class="lineNum"> 3962 </span> : : </a>
|
||
|
<a name="3963"><span class="lineNum"> 3963 </span> : : /**</a>
|
||
|
<a name="3964"><span class="lineNum"> 3964 </span> : : * Returns the total number of characters that the %string can hold</a>
|
||
|
<a name="3965"><span class="lineNum"> 3965 </span> : : * before needing to allocate more memory.</a>
|
||
|
<a name="3966"><span class="lineNum"> 3966 </span> : : */</a>
|
||
|
<a name="3967"><span class="lineNum"> 3967 </span> : : size_type</a>
|
||
|
<a name="3968"><span class="lineNum"> 3968 </span> : : capacity() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3969"><span class="lineNum"> 3969 </span> : : { return _M_rep()->_M_capacity; }</a>
|
||
|
<a name="3970"><span class="lineNum"> 3970 </span> : : </a>
|
||
|
<a name="3971"><span class="lineNum"> 3971 </span> : : /**</a>
|
||
|
<a name="3972"><span class="lineNum"> 3972 </span> : : * @brief Attempt to preallocate enough memory for specified number of</a>
|
||
|
<a name="3973"><span class="lineNum"> 3973 </span> : : * characters.</a>
|
||
|
<a name="3974"><span class="lineNum"> 3974 </span> : : * @param __res_arg Number of characters required.</a>
|
||
|
<a name="3975"><span class="lineNum"> 3975 </span> : : * @throw std::length_error If @a __res_arg exceeds @c max_size().</a>
|
||
|
<a name="3976"><span class="lineNum"> 3976 </span> : : *</a>
|
||
|
<a name="3977"><span class="lineNum"> 3977 </span> : : * This function attempts to reserve enough memory for the</a>
|
||
|
<a name="3978"><span class="lineNum"> 3978 </span> : : * %string to hold the specified number of characters. If the</a>
|
||
|
<a name="3979"><span class="lineNum"> 3979 </span> : : * number requested is more than max_size(), length_error is</a>
|
||
|
<a name="3980"><span class="lineNum"> 3980 </span> : : * thrown.</a>
|
||
|
<a name="3981"><span class="lineNum"> 3981 </span> : : *</a>
|
||
|
<a name="3982"><span class="lineNum"> 3982 </span> : : * The advantage of this function is that if optimal code is a</a>
|
||
|
<a name="3983"><span class="lineNum"> 3983 </span> : : * necessity and the user can determine the string length that will be</a>
|
||
|
<a name="3984"><span class="lineNum"> 3984 </span> : : * required, the user can reserve the memory in %advance, and thus</a>
|
||
|
<a name="3985"><span class="lineNum"> 3985 </span> : : * prevent a possible reallocation of memory and copying of %string</a>
|
||
|
<a name="3986"><span class="lineNum"> 3986 </span> : : * data.</a>
|
||
|
<a name="3987"><span class="lineNum"> 3987 </span> : : */</a>
|
||
|
<a name="3988"><span class="lineNum"> 3988 </span> : : void</a>
|
||
|
<a name="3989"><span class="lineNum"> 3989 </span> : : reserve(size_type __res_arg = 0);</a>
|
||
|
<a name="3990"><span class="lineNum"> 3990 </span> : : </a>
|
||
|
<a name="3991"><span class="lineNum"> 3991 </span> : : /**</a>
|
||
|
<a name="3992"><span class="lineNum"> 3992 </span> : : * Erases the string, making it empty.</a>
|
||
|
<a name="3993"><span class="lineNum"> 3993 </span> : : */</a>
|
||
|
<a name="3994"><span class="lineNum"> 3994 </span> : : #if _GLIBCXX_FULLY_DYNAMIC_STRING == 0</a>
|
||
|
<a name="3995"><span class="lineNum"> 3995 </span> : : void</a>
|
||
|
<a name="3996"><span class="lineNum"> 3996 </span> : : clear() _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="3997"><span class="lineNum"> 3997 </span> : : {</a>
|
||
|
<a name="3998"><span class="lineNum"> 3998 </span> : : if (_M_rep()->_M_is_shared())</a>
|
||
|
<a name="3999"><span class="lineNum"> 3999 </span> : : {</a>
|
||
|
<a name="4000"><span class="lineNum"> 4000 </span> : : _M_rep()->_M_dispose(this->get_allocator());</a>
|
||
|
<a name="4001"><span class="lineNum"> 4001 </span> : : _M_data(_S_empty_rep()._M_refdata());</a>
|
||
|
<a name="4002"><span class="lineNum"> 4002 </span> : : }</a>
|
||
|
<a name="4003"><span class="lineNum"> 4003 </span> : : else</a>
|
||
|
<a name="4004"><span class="lineNum"> 4004 </span> : : _M_rep()->_M_set_length_and_sharable(0);</a>
|
||
|
<a name="4005"><span class="lineNum"> 4005 </span> : : }</a>
|
||
|
<a name="4006"><span class="lineNum"> 4006 </span> : : #else</a>
|
||
|
<a name="4007"><span class="lineNum"> 4007 </span> : : // PR 56166: this should not throw.</a>
|
||
|
<a name="4008"><span class="lineNum"> 4008 </span> : : void</a>
|
||
|
<a name="4009"><span class="lineNum"> 4009 </span> : : clear()</a>
|
||
|
<a name="4010"><span class="lineNum"> 4010 </span> : : { _M_mutate(0, this->size(), 0); }</a>
|
||
|
<a name="4011"><span class="lineNum"> 4011 </span> : : #endif</a>
|
||
|
<a name="4012"><span class="lineNum"> 4012 </span> : : </a>
|
||
|
<a name="4013"><span class="lineNum"> 4013 </span> : : /**</a>
|
||
|
<a name="4014"><span class="lineNum"> 4014 </span> : : * Returns true if the %string is empty. Equivalent to </a>
|
||
|
<a name="4015"><span class="lineNum"> 4015 </span> : : * <code>*this == ""</code>.</a>
|
||
|
<a name="4016"><span class="lineNum"> 4016 </span> : : */</a>
|
||
|
<a name="4017"><span class="lineNum"> 4017 </span> : : _GLIBCXX_NODISCARD bool</a>
|
||
|
<a name="4018"><span class="lineNum"> 4018 </span> : : empty() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="4019"><span class="lineNum"> 4019 </span> : : { return this->size() == 0; }</a>
|
||
|
<a name="4020"><span class="lineNum"> 4020 </span> : : </a>
|
||
|
<a name="4021"><span class="lineNum"> 4021 </span> : : // Element access:</a>
|
||
|
<a name="4022"><span class="lineNum"> 4022 </span> : : /**</a>
|
||
|
<a name="4023"><span class="lineNum"> 4023 </span> : : * @brief Subscript access to the data contained in the %string.</a>
|
||
|
<a name="4024"><span class="lineNum"> 4024 </span> : : * @param __pos The index of the character to access.</a>
|
||
|
<a name="4025"><span class="lineNum"> 4025 </span> : : * @return Read-only (constant) reference to the character.</a>
|
||
|
<a name="4026"><span class="lineNum"> 4026 </span> : : *</a>
|
||
|
<a name="4027"><span class="lineNum"> 4027 </span> : : * This operator allows for easy, array-style, data access.</a>
|
||
|
<a name="4028"><span class="lineNum"> 4028 </span> : : * Note that data access with this operator is unchecked and</a>
|
||
|
<a name="4029"><span class="lineNum"> 4029 </span> : : * out_of_range lookups are not defined. (For checked lookups</a>
|
||
|
<a name="4030"><span class="lineNum"> 4030 </span> : : * see at().)</a>
|
||
|
<a name="4031"><span class="lineNum"> 4031 </span> : : */</a>
|
||
|
<a name="4032"><span class="lineNum"> 4032 </span> : : const_reference</a>
|
||
|
<a name="4033"><span class="lineNum"> 4033 </span> : : operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="4034"><span class="lineNum"> 4034 </span> : : {</a>
|
||
|
<a name="4035"><span class="lineNum"> 4035 </span> : : __glibcxx_assert(__pos <= size());</a>
|
||
|
<a name="4036"><span class="lineNum"> 4036 </span> : : return _M_data()[__pos];</a>
|
||
|
<a name="4037"><span class="lineNum"> 4037 </span> : : }</a>
|
||
|
<a name="4038"><span class="lineNum"> 4038 </span> : : </a>
|
||
|
<a name="4039"><span class="lineNum"> 4039 </span> : : /**</a>
|
||
|
<a name="4040"><span class="lineNum"> 4040 </span> : : * @brief Subscript access to the data contained in the %string.</a>
|
||
|
<a name="4041"><span class="lineNum"> 4041 </span> : : * @param __pos The index of the character to access.</a>
|
||
|
<a name="4042"><span class="lineNum"> 4042 </span> : : * @return Read/write reference to the character.</a>
|
||
|
<a name="4043"><span class="lineNum"> 4043 </span> : : *</a>
|
||
|
<a name="4044"><span class="lineNum"> 4044 </span> : : * This operator allows for easy, array-style, data access.</a>
|
||
|
<a name="4045"><span class="lineNum"> 4045 </span> : : * Note that data access with this operator is unchecked and</a>
|
||
|
<a name="4046"><span class="lineNum"> 4046 </span> : : * out_of_range lookups are not defined. (For checked lookups</a>
|
||
|
<a name="4047"><span class="lineNum"> 4047 </span> : : * see at().) Unshares the string.</a>
|
||
|
<a name="4048"><span class="lineNum"> 4048 </span> : : */</a>
|
||
|
<a name="4049"><span class="lineNum"> 4049 </span> : : reference</a>
|
||
|
<a name="4050"><span class="lineNum"> 4050 </span> : : operator[](size_type __pos)</a>
|
||
|
<a name="4051"><span class="lineNum"> 4051 </span> : : {</a>
|
||
|
<a name="4052"><span class="lineNum"> 4052 </span> : : // Allow pos == size() both in C++98 mode, as v3 extension,</a>
|
||
|
<a name="4053"><span class="lineNum"> 4053 </span> : : // and in C++11 mode.</a>
|
||
|
<a name="4054"><span class="lineNum"> 4054 </span> : : __glibcxx_assert(__pos <= size());</a>
|
||
|
<a name="4055"><span class="lineNum"> 4055 </span> : : // In pedantic mode be strict in C++98 mode.</a>
|
||
|
<a name="4056"><span class="lineNum"> 4056 </span> : : _GLIBCXX_DEBUG_PEDASSERT(__cplusplus >= 201103L || __pos < size());</a>
|
||
|
<a name="4057"><span class="lineNum"> 4057 </span> : : _M_leak();</a>
|
||
|
<a name="4058"><span class="lineNum"> 4058 </span> : : return _M_data()[__pos];</a>
|
||
|
<a name="4059"><span class="lineNum"> 4059 </span> : : }</a>
|
||
|
<a name="4060"><span class="lineNum"> 4060 </span> : : </a>
|
||
|
<a name="4061"><span class="lineNum"> 4061 </span> : : /**</a>
|
||
|
<a name="4062"><span class="lineNum"> 4062 </span> : : * @brief Provides access to the data contained in the %string.</a>
|
||
|
<a name="4063"><span class="lineNum"> 4063 </span> : : * @param __n The index of the character to access.</a>
|
||
|
<a name="4064"><span class="lineNum"> 4064 </span> : : * @return Read-only (const) reference to the character.</a>
|
||
|
<a name="4065"><span class="lineNum"> 4065 </span> : : * @throw std::out_of_range If @a n is an invalid index.</a>
|
||
|
<a name="4066"><span class="lineNum"> 4066 </span> : : *</a>
|
||
|
<a name="4067"><span class="lineNum"> 4067 </span> : : * This function provides for safer data access. The parameter is</a>
|
||
|
<a name="4068"><span class="lineNum"> 4068 </span> : : * first checked that it is in the range of the string. The function</a>
|
||
|
<a name="4069"><span class="lineNum"> 4069 </span> : : * throws out_of_range if the check fails.</a>
|
||
|
<a name="4070"><span class="lineNum"> 4070 </span> : : */</a>
|
||
|
<a name="4071"><span class="lineNum"> 4071 </span> : : const_reference</a>
|
||
|
<a name="4072"><span class="lineNum"> 4072 </span> : : at(size_type __n) const</a>
|
||
|
<a name="4073"><span class="lineNum"> 4073 </span> : : {</a>
|
||
|
<a name="4074"><span class="lineNum"> 4074 </span> : : if (__n >= this->size())</a>
|
||
|
<a name="4075"><span class="lineNum"> 4075 </span> : : __throw_out_of_range_fmt(__N("basic_string::at: __n "</a>
|
||
|
<a name="4076"><span class="lineNum"> 4076 </span> : : "(which is %zu) >= this->size() "</a>
|
||
|
<a name="4077"><span class="lineNum"> 4077 </span> : : "(which is %zu)"),</a>
|
||
|
<a name="4078"><span class="lineNum"> 4078 </span> : : __n, this->size());</a>
|
||
|
<a name="4079"><span class="lineNum"> 4079 </span> : : return _M_data()[__n];</a>
|
||
|
<a name="4080"><span class="lineNum"> 4080 </span> : : }</a>
|
||
|
<a name="4081"><span class="lineNum"> 4081 </span> : : </a>
|
||
|
<a name="4082"><span class="lineNum"> 4082 </span> : : /**</a>
|
||
|
<a name="4083"><span class="lineNum"> 4083 </span> : : * @brief Provides access to the data contained in the %string.</a>
|
||
|
<a name="4084"><span class="lineNum"> 4084 </span> : : * @param __n The index of the character to access.</a>
|
||
|
<a name="4085"><span class="lineNum"> 4085 </span> : : * @return Read/write reference to the character.</a>
|
||
|
<a name="4086"><span class="lineNum"> 4086 </span> : : * @throw std::out_of_range If @a n is an invalid index.</a>
|
||
|
<a name="4087"><span class="lineNum"> 4087 </span> : : *</a>
|
||
|
<a name="4088"><span class="lineNum"> 4088 </span> : : * This function provides for safer data access. The parameter is</a>
|
||
|
<a name="4089"><span class="lineNum"> 4089 </span> : : * first checked that it is in the range of the string. The function</a>
|
||
|
<a name="4090"><span class="lineNum"> 4090 </span> : : * throws out_of_range if the check fails. Success results in</a>
|
||
|
<a name="4091"><span class="lineNum"> 4091 </span> : : * unsharing the string.</a>
|
||
|
<a name="4092"><span class="lineNum"> 4092 </span> : : */</a>
|
||
|
<a name="4093"><span class="lineNum"> 4093 </span> : : reference</a>
|
||
|
<a name="4094"><span class="lineNum"> 4094 </span> : : at(size_type __n)</a>
|
||
|
<a name="4095"><span class="lineNum"> 4095 </span> : : {</a>
|
||
|
<a name="4096"><span class="lineNum"> 4096 </span> : : if (__n >= size())</a>
|
||
|
<a name="4097"><span class="lineNum"> 4097 </span> : : __throw_out_of_range_fmt(__N("basic_string::at: __n "</a>
|
||
|
<a name="4098"><span class="lineNum"> 4098 </span> : : "(which is %zu) >= this->size() "</a>
|
||
|
<a name="4099"><span class="lineNum"> 4099 </span> : : "(which is %zu)"),</a>
|
||
|
<a name="4100"><span class="lineNum"> 4100 </span> : : __n, this->size());</a>
|
||
|
<a name="4101"><span class="lineNum"> 4101 </span> : : _M_leak();</a>
|
||
|
<a name="4102"><span class="lineNum"> 4102 </span> : : return _M_data()[__n];</a>
|
||
|
<a name="4103"><span class="lineNum"> 4103 </span> : : }</a>
|
||
|
<a name="4104"><span class="lineNum"> 4104 </span> : : </a>
|
||
|
<a name="4105"><span class="lineNum"> 4105 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="4106"><span class="lineNum"> 4106 </span> : : /**</a>
|
||
|
<a name="4107"><span class="lineNum"> 4107 </span> : : * Returns a read/write reference to the data at the first</a>
|
||
|
<a name="4108"><span class="lineNum"> 4108 </span> : : * element of the %string.</a>
|
||
|
<a name="4109"><span class="lineNum"> 4109 </span> : : */</a>
|
||
|
<a name="4110"><span class="lineNum"> 4110 </span> : : reference</a>
|
||
|
<a name="4111"><span class="lineNum"> 4111 </span> : : front()</a>
|
||
|
<a name="4112"><span class="lineNum"> 4112 </span> : : {</a>
|
||
|
<a name="4113"><span class="lineNum"> 4113 </span> : : __glibcxx_assert(!empty());</a>
|
||
|
<a name="4114"><span class="lineNum"> 4114 </span> : : return operator[](0);</a>
|
||
|
<a name="4115"><span class="lineNum"> 4115 </span> : : }</a>
|
||
|
<a name="4116"><span class="lineNum"> 4116 </span> : : </a>
|
||
|
<a name="4117"><span class="lineNum"> 4117 </span> : : /**</a>
|
||
|
<a name="4118"><span class="lineNum"> 4118 </span> : : * Returns a read-only (constant) reference to the data at the first</a>
|
||
|
<a name="4119"><span class="lineNum"> 4119 </span> : : * element of the %string.</a>
|
||
|
<a name="4120"><span class="lineNum"> 4120 </span> : : */</a>
|
||
|
<a name="4121"><span class="lineNum"> 4121 </span> : : const_reference</a>
|
||
|
<a name="4122"><span class="lineNum"> 4122 </span> : : front() const noexcept</a>
|
||
|
<a name="4123"><span class="lineNum"> 4123 </span> : : {</a>
|
||
|
<a name="4124"><span class="lineNum"> 4124 </span> : : __glibcxx_assert(!empty());</a>
|
||
|
<a name="4125"><span class="lineNum"> 4125 </span> : : return operator[](0);</a>
|
||
|
<a name="4126"><span class="lineNum"> 4126 </span> : : }</a>
|
||
|
<a name="4127"><span class="lineNum"> 4127 </span> : : </a>
|
||
|
<a name="4128"><span class="lineNum"> 4128 </span> : : /**</a>
|
||
|
<a name="4129"><span class="lineNum"> 4129 </span> : : * Returns a read/write reference to the data at the last</a>
|
||
|
<a name="4130"><span class="lineNum"> 4130 </span> : : * element of the %string.</a>
|
||
|
<a name="4131"><span class="lineNum"> 4131 </span> : : */</a>
|
||
|
<a name="4132"><span class="lineNum"> 4132 </span> : : reference</a>
|
||
|
<a name="4133"><span class="lineNum"> 4133 </span> : : back()</a>
|
||
|
<a name="4134"><span class="lineNum"> 4134 </span> : : {</a>
|
||
|
<a name="4135"><span class="lineNum"> 4135 </span> : : __glibcxx_assert(!empty());</a>
|
||
|
<a name="4136"><span class="lineNum"> 4136 </span> : : return operator[](this->size() - 1);</a>
|
||
|
<a name="4137"><span class="lineNum"> 4137 </span> : : }</a>
|
||
|
<a name="4138"><span class="lineNum"> 4138 </span> : : </a>
|
||
|
<a name="4139"><span class="lineNum"> 4139 </span> : : /**</a>
|
||
|
<a name="4140"><span class="lineNum"> 4140 </span> : : * Returns a read-only (constant) reference to the data at the</a>
|
||
|
<a name="4141"><span class="lineNum"> 4141 </span> : : * last element of the %string.</a>
|
||
|
<a name="4142"><span class="lineNum"> 4142 </span> : : */</a>
|
||
|
<a name="4143"><span class="lineNum"> 4143 </span> : : const_reference</a>
|
||
|
<a name="4144"><span class="lineNum"> 4144 </span> : : back() const noexcept</a>
|
||
|
<a name="4145"><span class="lineNum"> 4145 </span> : : {</a>
|
||
|
<a name="4146"><span class="lineNum"> 4146 </span> : : __glibcxx_assert(!empty());</a>
|
||
|
<a name="4147"><span class="lineNum"> 4147 </span> : : return operator[](this->size() - 1);</a>
|
||
|
<a name="4148"><span class="lineNum"> 4148 </span> : : }</a>
|
||
|
<a name="4149"><span class="lineNum"> 4149 </span> : : #endif</a>
|
||
|
<a name="4150"><span class="lineNum"> 4150 </span> : : </a>
|
||
|
<a name="4151"><span class="lineNum"> 4151 </span> : : // Modifiers:</a>
|
||
|
<a name="4152"><span class="lineNum"> 4152 </span> : : /**</a>
|
||
|
<a name="4153"><span class="lineNum"> 4153 </span> : : * @brief Append a string to this string.</a>
|
||
|
<a name="4154"><span class="lineNum"> 4154 </span> : : * @param __str The string to append.</a>
|
||
|
<a name="4155"><span class="lineNum"> 4155 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4156"><span class="lineNum"> 4156 </span> : : */</a>
|
||
|
<a name="4157"><span class="lineNum"> 4157 </span> : : basic_string&</a>
|
||
|
<a name="4158"><span class="lineNum"> 4158 </span> : : operator+=(const basic_string& __str)</a>
|
||
|
<a name="4159"><span class="lineNum"> 4159 </span> : : { return this->append(__str); }</a>
|
||
|
<a name="4160"><span class="lineNum"> 4160 </span> : : </a>
|
||
|
<a name="4161"><span class="lineNum"> 4161 </span> : : /**</a>
|
||
|
<a name="4162"><span class="lineNum"> 4162 </span> : : * @brief Append a C string.</a>
|
||
|
<a name="4163"><span class="lineNum"> 4163 </span> : : * @param __s The C string to append.</a>
|
||
|
<a name="4164"><span class="lineNum"> 4164 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4165"><span class="lineNum"> 4165 </span> : : */</a>
|
||
|
<a name="4166"><span class="lineNum"> 4166 </span> : : basic_string&</a>
|
||
|
<a name="4167"><span class="lineNum"> 4167 </span> : : operator+=(const _CharT* __s)</a>
|
||
|
<a name="4168"><span class="lineNum"> 4168 </span> : : { return this->append(__s); }</a>
|
||
|
<a name="4169"><span class="lineNum"> 4169 </span> : : </a>
|
||
|
<a name="4170"><span class="lineNum"> 4170 </span> : : /**</a>
|
||
|
<a name="4171"><span class="lineNum"> 4171 </span> : : * @brief Append a character.</a>
|
||
|
<a name="4172"><span class="lineNum"> 4172 </span> : : * @param __c The character to append.</a>
|
||
|
<a name="4173"><span class="lineNum"> 4173 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4174"><span class="lineNum"> 4174 </span> : : */</a>
|
||
|
<a name="4175"><span class="lineNum"> 4175 </span> : : basic_string&</a>
|
||
|
<a name="4176"><span class="lineNum"> 4176 </span> : : operator+=(_CharT __c)</a>
|
||
|
<a name="4177"><span class="lineNum"> 4177 </span> : : { </a>
|
||
|
<a name="4178"><span class="lineNum"> 4178 </span> : : this->push_back(__c);</a>
|
||
|
<a name="4179"><span class="lineNum"> 4179 </span> : : return *this;</a>
|
||
|
<a name="4180"><span class="lineNum"> 4180 </span> : : }</a>
|
||
|
<a name="4181"><span class="lineNum"> 4181 </span> : : </a>
|
||
|
<a name="4182"><span class="lineNum"> 4182 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="4183"><span class="lineNum"> 4183 </span> : : /**</a>
|
||
|
<a name="4184"><span class="lineNum"> 4184 </span> : : * @brief Append an initializer_list of characters.</a>
|
||
|
<a name="4185"><span class="lineNum"> 4185 </span> : : * @param __l The initializer_list of characters to be appended.</a>
|
||
|
<a name="4186"><span class="lineNum"> 4186 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4187"><span class="lineNum"> 4187 </span> : : */</a>
|
||
|
<a name="4188"><span class="lineNum"> 4188 </span> : : basic_string&</a>
|
||
|
<a name="4189"><span class="lineNum"> 4189 </span> : : operator+=(initializer_list<_CharT> __l)</a>
|
||
|
<a name="4190"><span class="lineNum"> 4190 </span> : : { return this->append(__l.begin(), __l.size()); }</a>
|
||
|
<a name="4191"><span class="lineNum"> 4191 </span> : : #endif // C++11</a>
|
||
|
<a name="4192"><span class="lineNum"> 4192 </span> : : </a>
|
||
|
<a name="4193"><span class="lineNum"> 4193 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="4194"><span class="lineNum"> 4194 </span> : : /**</a>
|
||
|
<a name="4195"><span class="lineNum"> 4195 </span> : : * @brief Append a string_view.</a>
|
||
|
<a name="4196"><span class="lineNum"> 4196 </span> : : * @param __svt The object convertible to string_view to be appended.</a>
|
||
|
<a name="4197"><span class="lineNum"> 4197 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4198"><span class="lineNum"> 4198 </span> : : */</a>
|
||
|
<a name="4199"><span class="lineNum"> 4199 </span> : : template<typename _Tp></a>
|
||
|
<a name="4200"><span class="lineNum"> 4200 </span> : : _If_sv<_Tp, basic_string&></a>
|
||
|
<a name="4201"><span class="lineNum"> 4201 </span> : : operator+=(const _Tp& __svt)</a>
|
||
|
<a name="4202"><span class="lineNum"> 4202 </span> : : { return this->append(__svt); }</a>
|
||
|
<a name="4203"><span class="lineNum"> 4203 </span> : : #endif // C++17</a>
|
||
|
<a name="4204"><span class="lineNum"> 4204 </span> : : </a>
|
||
|
<a name="4205"><span class="lineNum"> 4205 </span> : : /**</a>
|
||
|
<a name="4206"><span class="lineNum"> 4206 </span> : : * @brief Append a string to this string.</a>
|
||
|
<a name="4207"><span class="lineNum"> 4207 </span> : : * @param __str The string to append.</a>
|
||
|
<a name="4208"><span class="lineNum"> 4208 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4209"><span class="lineNum"> 4209 </span> : : */</a>
|
||
|
<a name="4210"><span class="lineNum"> 4210 </span> : : basic_string&</a>
|
||
|
<a name="4211"><span class="lineNum"> 4211 </span> : : append(const basic_string& __str);</a>
|
||
|
<a name="4212"><span class="lineNum"> 4212 </span> : : </a>
|
||
|
<a name="4213"><span class="lineNum"> 4213 </span> : : /**</a>
|
||
|
<a name="4214"><span class="lineNum"> 4214 </span> : : * @brief Append a substring.</a>
|
||
|
<a name="4215"><span class="lineNum"> 4215 </span> : : * @param __str The string to append.</a>
|
||
|
<a name="4216"><span class="lineNum"> 4216 </span> : : * @param __pos Index of the first character of str to append.</a>
|
||
|
<a name="4217"><span class="lineNum"> 4217 </span> : : * @param __n The number of characters to append.</a>
|
||
|
<a name="4218"><span class="lineNum"> 4218 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4219"><span class="lineNum"> 4219 </span> : : * @throw std::out_of_range if @a __pos is not a valid index.</a>
|
||
|
<a name="4220"><span class="lineNum"> 4220 </span> : : *</a>
|
||
|
<a name="4221"><span class="lineNum"> 4221 </span> : : * This function appends @a __n characters from @a __str</a>
|
||
|
<a name="4222"><span class="lineNum"> 4222 </span> : : * starting at @a __pos to this string. If @a __n is is larger</a>
|
||
|
<a name="4223"><span class="lineNum"> 4223 </span> : : * than the number of available characters in @a __str, the</a>
|
||
|
<a name="4224"><span class="lineNum"> 4224 </span> : : * remainder of @a __str is appended.</a>
|
||
|
<a name="4225"><span class="lineNum"> 4225 </span> : : */</a>
|
||
|
<a name="4226"><span class="lineNum"> 4226 </span> : : basic_string&</a>
|
||
|
<a name="4227"><span class="lineNum"> 4227 </span> : : append(const basic_string& __str, size_type __pos, size_type __n = npos);</a>
|
||
|
<a name="4228"><span class="lineNum"> 4228 </span> : : </a>
|
||
|
<a name="4229"><span class="lineNum"> 4229 </span> : : /**</a>
|
||
|
<a name="4230"><span class="lineNum"> 4230 </span> : : * @brief Append a C substring.</a>
|
||
|
<a name="4231"><span class="lineNum"> 4231 </span> : : * @param __s The C string to append.</a>
|
||
|
<a name="4232"><span class="lineNum"> 4232 </span> : : * @param __n The number of characters to append.</a>
|
||
|
<a name="4233"><span class="lineNum"> 4233 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4234"><span class="lineNum"> 4234 </span> : : */</a>
|
||
|
<a name="4235"><span class="lineNum"> 4235 </span> : : basic_string&</a>
|
||
|
<a name="4236"><span class="lineNum"> 4236 </span> : : append(const _CharT* __s, size_type __n);</a>
|
||
|
<a name="4237"><span class="lineNum"> 4237 </span> : : </a>
|
||
|
<a name="4238"><span class="lineNum"> 4238 </span> : : /**</a>
|
||
|
<a name="4239"><span class="lineNum"> 4239 </span> : : * @brief Append a C string.</a>
|
||
|
<a name="4240"><span class="lineNum"> 4240 </span> : : * @param __s The C string to append.</a>
|
||
|
<a name="4241"><span class="lineNum"> 4241 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4242"><span class="lineNum"> 4242 </span> : : */</a>
|
||
|
<a name="4243"><span class="lineNum"> 4243 </span> : : basic_string&</a>
|
||
|
<a name="4244"><span class="lineNum"> 4244 </span> : : append(const _CharT* __s)</a>
|
||
|
<a name="4245"><span class="lineNum"> 4245 </span> : : {</a>
|
||
|
<a name="4246"><span class="lineNum"> 4246 </span> : : __glibcxx_requires_string(__s);</a>
|
||
|
<a name="4247"><span class="lineNum"> 4247 </span> : : return this->append(__s, traits_type::length(__s));</a>
|
||
|
<a name="4248"><span class="lineNum"> 4248 </span> : : }</a>
|
||
|
<a name="4249"><span class="lineNum"> 4249 </span> : : </a>
|
||
|
<a name="4250"><span class="lineNum"> 4250 </span> : : /**</a>
|
||
|
<a name="4251"><span class="lineNum"> 4251 </span> : : * @brief Append multiple characters.</a>
|
||
|
<a name="4252"><span class="lineNum"> 4252 </span> : : * @param __n The number of characters to append.</a>
|
||
|
<a name="4253"><span class="lineNum"> 4253 </span> : : * @param __c The character to use.</a>
|
||
|
<a name="4254"><span class="lineNum"> 4254 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4255"><span class="lineNum"> 4255 </span> : : *</a>
|
||
|
<a name="4256"><span class="lineNum"> 4256 </span> : : * Appends __n copies of __c to this string.</a>
|
||
|
<a name="4257"><span class="lineNum"> 4257 </span> : : */</a>
|
||
|
<a name="4258"><span class="lineNum"> 4258 </span> : : basic_string&</a>
|
||
|
<a name="4259"><span class="lineNum"> 4259 </span> : : append(size_type __n, _CharT __c);</a>
|
||
|
<a name="4260"><span class="lineNum"> 4260 </span> : : </a>
|
||
|
<a name="4261"><span class="lineNum"> 4261 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="4262"><span class="lineNum"> 4262 </span> : : /**</a>
|
||
|
<a name="4263"><span class="lineNum"> 4263 </span> : : * @brief Append an initializer_list of characters.</a>
|
||
|
<a name="4264"><span class="lineNum"> 4264 </span> : : * @param __l The initializer_list of characters to append.</a>
|
||
|
<a name="4265"><span class="lineNum"> 4265 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4266"><span class="lineNum"> 4266 </span> : : */</a>
|
||
|
<a name="4267"><span class="lineNum"> 4267 </span> : : basic_string&</a>
|
||
|
<a name="4268"><span class="lineNum"> 4268 </span> : : append(initializer_list<_CharT> __l)</a>
|
||
|
<a name="4269"><span class="lineNum"> 4269 </span> : : { return this->append(__l.begin(), __l.size()); }</a>
|
||
|
<a name="4270"><span class="lineNum"> 4270 </span> : : #endif // C++11</a>
|
||
|
<a name="4271"><span class="lineNum"> 4271 </span> : : </a>
|
||
|
<a name="4272"><span class="lineNum"> 4272 </span> : : /**</a>
|
||
|
<a name="4273"><span class="lineNum"> 4273 </span> : : * @brief Append a range of characters.</a>
|
||
|
<a name="4274"><span class="lineNum"> 4274 </span> : : * @param __first Iterator referencing the first character to append.</a>
|
||
|
<a name="4275"><span class="lineNum"> 4275 </span> : : * @param __last Iterator marking the end of the range.</a>
|
||
|
<a name="4276"><span class="lineNum"> 4276 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4277"><span class="lineNum"> 4277 </span> : : *</a>
|
||
|
<a name="4278"><span class="lineNum"> 4278 </span> : : * Appends characters in the range [__first,__last) to this string.</a>
|
||
|
<a name="4279"><span class="lineNum"> 4279 </span> : : */</a>
|
||
|
<a name="4280"><span class="lineNum"> 4280 </span> : : template<class _InputIterator></a>
|
||
|
<a name="4281"><span class="lineNum"> 4281 </span> : : basic_string&</a>
|
||
|
<a name="4282"><span class="lineNum"> 4282 </span> : : append(_InputIterator __first, _InputIterator __last)</a>
|
||
|
<a name="4283"><span class="lineNum"> 4283 </span> : : { return this->replace(_M_iend(), _M_iend(), __first, __last); }</a>
|
||
|
<a name="4284"><span class="lineNum"> 4284 </span> : : </a>
|
||
|
<a name="4285"><span class="lineNum"> 4285 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="4286"><span class="lineNum"> 4286 </span> : : /**</a>
|
||
|
<a name="4287"><span class="lineNum"> 4287 </span> : : * @brief Append a string_view.</a>
|
||
|
<a name="4288"><span class="lineNum"> 4288 </span> : : * @param __svt The object convertible to string_view to be appended.</a>
|
||
|
<a name="4289"><span class="lineNum"> 4289 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4290"><span class="lineNum"> 4290 </span> : : */</a>
|
||
|
<a name="4291"><span class="lineNum"> 4291 </span> : : template<typename _Tp></a>
|
||
|
<a name="4292"><span class="lineNum"> 4292 </span> : : _If_sv<_Tp, basic_string&></a>
|
||
|
<a name="4293"><span class="lineNum"> 4293 </span> : : append(const _Tp& __svt)</a>
|
||
|
<a name="4294"><span class="lineNum"> 4294 </span> : : {</a>
|
||
|
<a name="4295"><span class="lineNum"> 4295 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="4296"><span class="lineNum"> 4296 </span> : : return this->append(__sv.data(), __sv.size());</a>
|
||
|
<a name="4297"><span class="lineNum"> 4297 </span> : : }</a>
|
||
|
<a name="4298"><span class="lineNum"> 4298 </span> : : </a>
|
||
|
<a name="4299"><span class="lineNum"> 4299 </span> : : /**</a>
|
||
|
<a name="4300"><span class="lineNum"> 4300 </span> : : * @brief Append a range of characters from a string_view.</a>
|
||
|
<a name="4301"><span class="lineNum"> 4301 </span> : : * @param __svt The object convertible to string_view to be appended</a>
|
||
|
<a name="4302"><span class="lineNum"> 4302 </span> : : * from.</a>
|
||
|
<a name="4303"><span class="lineNum"> 4303 </span> : : * @param __pos The position in the string_view to append from.</a>
|
||
|
<a name="4304"><span class="lineNum"> 4304 </span> : : * @param __n The number of characters to append from the string_view.</a>
|
||
|
<a name="4305"><span class="lineNum"> 4305 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4306"><span class="lineNum"> 4306 </span> : : */</a>
|
||
|
<a name="4307"><span class="lineNum"> 4307 </span> : : template<typename _Tp></a>
|
||
|
<a name="4308"><span class="lineNum"> 4308 </span> : : _If_sv<_Tp, basic_string&></a>
|
||
|
<a name="4309"><span class="lineNum"> 4309 </span> : : append(const _Tp& __svt, size_type __pos, size_type __n = npos)</a>
|
||
|
<a name="4310"><span class="lineNum"> 4310 </span> : : {</a>
|
||
|
<a name="4311"><span class="lineNum"> 4311 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="4312"><span class="lineNum"> 4312 </span> : : return append(__sv.data()</a>
|
||
|
<a name="4313"><span class="lineNum"> 4313 </span> : : + std::__sv_check(__sv.size(), __pos, "basic_string::append"),</a>
|
||
|
<a name="4314"><span class="lineNum"> 4314 </span> : : std::__sv_limit(__sv.size(), __pos, __n));</a>
|
||
|
<a name="4315"><span class="lineNum"> 4315 </span> : : }</a>
|
||
|
<a name="4316"><span class="lineNum"> 4316 </span> : : #endif // C++17</a>
|
||
|
<a name="4317"><span class="lineNum"> 4317 </span> : : </a>
|
||
|
<a name="4318"><span class="lineNum"> 4318 </span> : : /**</a>
|
||
|
<a name="4319"><span class="lineNum"> 4319 </span> : : * @brief Append a single character.</a>
|
||
|
<a name="4320"><span class="lineNum"> 4320 </span> : : * @param __c Character to append.</a>
|
||
|
<a name="4321"><span class="lineNum"> 4321 </span> : : */</a>
|
||
|
<a name="4322"><span class="lineNum"> 4322 </span> : : void</a>
|
||
|
<a name="4323"><span class="lineNum"> 4323 </span> : : push_back(_CharT __c)</a>
|
||
|
<a name="4324"><span class="lineNum"> 4324 </span> : : { </a>
|
||
|
<a name="4325"><span class="lineNum"> 4325 </span> : : const size_type __len = 1 + this->size();</a>
|
||
|
<a name="4326"><span class="lineNum"> 4326 </span> : : if (__len > this->capacity() || _M_rep()->_M_is_shared())</a>
|
||
|
<a name="4327"><span class="lineNum"> 4327 </span> : : this->reserve(__len);</a>
|
||
|
<a name="4328"><span class="lineNum"> 4328 </span> : : traits_type::assign(_M_data()[this->size()], __c);</a>
|
||
|
<a name="4329"><span class="lineNum"> 4329 </span> : : _M_rep()->_M_set_length_and_sharable(__len);</a>
|
||
|
<a name="4330"><span class="lineNum"> 4330 </span> : : }</a>
|
||
|
<a name="4331"><span class="lineNum"> 4331 </span> : : </a>
|
||
|
<a name="4332"><span class="lineNum"> 4332 </span> : : /**</a>
|
||
|
<a name="4333"><span class="lineNum"> 4333 </span> : : * @brief Set value to contents of another string.</a>
|
||
|
<a name="4334"><span class="lineNum"> 4334 </span> : : * @param __str Source string to use.</a>
|
||
|
<a name="4335"><span class="lineNum"> 4335 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4336"><span class="lineNum"> 4336 </span> : : */</a>
|
||
|
<a name="4337"><span class="lineNum"> 4337 </span> : : basic_string&</a>
|
||
|
<a name="4338"><span class="lineNum"> 4338 </span> : : assign(const basic_string& __str);</a>
|
||
|
<a name="4339"><span class="lineNum"> 4339 </span> : : </a>
|
||
|
<a name="4340"><span class="lineNum"> 4340 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="4341"><span class="lineNum"> 4341 </span> : : /**</a>
|
||
|
<a name="4342"><span class="lineNum"> 4342 </span> : : * @brief Set value to contents of another string.</a>
|
||
|
<a name="4343"><span class="lineNum"> 4343 </span> : : * @param __str Source string to use.</a>
|
||
|
<a name="4344"><span class="lineNum"> 4344 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4345"><span class="lineNum"> 4345 </span> : : *</a>
|
||
|
<a name="4346"><span class="lineNum"> 4346 </span> : : * This function sets this string to the exact contents of @a __str.</a>
|
||
|
<a name="4347"><span class="lineNum"> 4347 </span> : : * @a __str is a valid, but unspecified string.</a>
|
||
|
<a name="4348"><span class="lineNum"> 4348 </span> : : */</a>
|
||
|
<a name="4349"><span class="lineNum"> 4349 </span> : : basic_string&</a>
|
||
|
<a name="4350"><span class="lineNum"> 4350 </span> : : assign(basic_string&& __str)</a>
|
||
|
<a name="4351"><span class="lineNum"> 4351 </span> : : noexcept(allocator_traits<_Alloc>::is_always_equal::value)</a>
|
||
|
<a name="4352"><span class="lineNum"> 4352 </span> : : {</a>
|
||
|
<a name="4353"><span class="lineNum"> 4353 </span> : : this->swap(__str);</a>
|
||
|
<a name="4354"><span class="lineNum"> 4354 </span> : : return *this;</a>
|
||
|
<a name="4355"><span class="lineNum"> 4355 </span> : : }</a>
|
||
|
<a name="4356"><span class="lineNum"> 4356 </span> : : #endif // C++11</a>
|
||
|
<a name="4357"><span class="lineNum"> 4357 </span> : : </a>
|
||
|
<a name="4358"><span class="lineNum"> 4358 </span> : : /**</a>
|
||
|
<a name="4359"><span class="lineNum"> 4359 </span> : : * @brief Set value to a substring of a string.</a>
|
||
|
<a name="4360"><span class="lineNum"> 4360 </span> : : * @param __str The string to use.</a>
|
||
|
<a name="4361"><span class="lineNum"> 4361 </span> : : * @param __pos Index of the first character of str.</a>
|
||
|
<a name="4362"><span class="lineNum"> 4362 </span> : : * @param __n Number of characters to use.</a>
|
||
|
<a name="4363"><span class="lineNum"> 4363 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4364"><span class="lineNum"> 4364 </span> : : * @throw std::out_of_range if @a pos is not a valid index.</a>
|
||
|
<a name="4365"><span class="lineNum"> 4365 </span> : : *</a>
|
||
|
<a name="4366"><span class="lineNum"> 4366 </span> : : * This function sets this string to the substring of @a __str</a>
|
||
|
<a name="4367"><span class="lineNum"> 4367 </span> : : * consisting of @a __n characters at @a __pos. If @a __n is</a>
|
||
|
<a name="4368"><span class="lineNum"> 4368 </span> : : * is larger than the number of available characters in @a</a>
|
||
|
<a name="4369"><span class="lineNum"> 4369 </span> : : * __str, the remainder of @a __str is used.</a>
|
||
|
<a name="4370"><span class="lineNum"> 4370 </span> : : */</a>
|
||
|
<a name="4371"><span class="lineNum"> 4371 </span> : : basic_string&</a>
|
||
|
<a name="4372"><span class="lineNum"> 4372 </span> : : assign(const basic_string& __str, size_type __pos, size_type __n = npos)</a>
|
||
|
<a name="4373"><span class="lineNum"> 4373 </span> : : { return this->assign(__str._M_data()</a>
|
||
|
<a name="4374"><span class="lineNum"> 4374 </span> : : + __str._M_check(__pos, "basic_string::assign"),</a>
|
||
|
<a name="4375"><span class="lineNum"> 4375 </span> : : __str._M_limit(__pos, __n)); }</a>
|
||
|
<a name="4376"><span class="lineNum"> 4376 </span> : : </a>
|
||
|
<a name="4377"><span class="lineNum"> 4377 </span> : : /**</a>
|
||
|
<a name="4378"><span class="lineNum"> 4378 </span> : : * @brief Set value to a C substring.</a>
|
||
|
<a name="4379"><span class="lineNum"> 4379 </span> : : * @param __s The C string to use.</a>
|
||
|
<a name="4380"><span class="lineNum"> 4380 </span> : : * @param __n Number of characters to use.</a>
|
||
|
<a name="4381"><span class="lineNum"> 4381 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4382"><span class="lineNum"> 4382 </span> : : *</a>
|
||
|
<a name="4383"><span class="lineNum"> 4383 </span> : : * This function sets the value of this string to the first @a __n</a>
|
||
|
<a name="4384"><span class="lineNum"> 4384 </span> : : * characters of @a __s. If @a __n is is larger than the number of</a>
|
||
|
<a name="4385"><span class="lineNum"> 4385 </span> : : * available characters in @a __s, the remainder of @a __s is used.</a>
|
||
|
<a name="4386"><span class="lineNum"> 4386 </span> : : */</a>
|
||
|
<a name="4387"><span class="lineNum"> 4387 </span> : : basic_string&</a>
|
||
|
<a name="4388"><span class="lineNum"> 4388 </span> : : assign(const _CharT* __s, size_type __n);</a>
|
||
|
<a name="4389"><span class="lineNum"> 4389 </span> : : </a>
|
||
|
<a name="4390"><span class="lineNum"> 4390 </span> : : /**</a>
|
||
|
<a name="4391"><span class="lineNum"> 4391 </span> : : * @brief Set value to contents of a C string.</a>
|
||
|
<a name="4392"><span class="lineNum"> 4392 </span> : : * @param __s The C string to use.</a>
|
||
|
<a name="4393"><span class="lineNum"> 4393 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4394"><span class="lineNum"> 4394 </span> : : *</a>
|
||
|
<a name="4395"><span class="lineNum"> 4395 </span> : : * This function sets the value of this string to the value of @a __s.</a>
|
||
|
<a name="4396"><span class="lineNum"> 4396 </span> : : * The data is copied, so there is no dependence on @a __s once the</a>
|
||
|
<a name="4397"><span class="lineNum"> 4397 </span> : : * function returns.</a>
|
||
|
<a name="4398"><span class="lineNum"> 4398 </span> : : */</a>
|
||
|
<a name="4399"><span class="lineNum"> 4399 </span> : : basic_string&</a>
|
||
|
<a name="4400"><span class="lineNum"> 4400 </span> : : assign(const _CharT* __s)</a>
|
||
|
<a name="4401"><span class="lineNum"> 4401 </span> : : {</a>
|
||
|
<a name="4402"><span class="lineNum"> 4402 </span> : : __glibcxx_requires_string(__s);</a>
|
||
|
<a name="4403"><span class="lineNum"> 4403 </span> : : return this->assign(__s, traits_type::length(__s));</a>
|
||
|
<a name="4404"><span class="lineNum"> 4404 </span> : : }</a>
|
||
|
<a name="4405"><span class="lineNum"> 4405 </span> : : </a>
|
||
|
<a name="4406"><span class="lineNum"> 4406 </span> : : /**</a>
|
||
|
<a name="4407"><span class="lineNum"> 4407 </span> : : * @brief Set value to multiple characters.</a>
|
||
|
<a name="4408"><span class="lineNum"> 4408 </span> : : * @param __n Length of the resulting string.</a>
|
||
|
<a name="4409"><span class="lineNum"> 4409 </span> : : * @param __c The character to use.</a>
|
||
|
<a name="4410"><span class="lineNum"> 4410 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4411"><span class="lineNum"> 4411 </span> : : *</a>
|
||
|
<a name="4412"><span class="lineNum"> 4412 </span> : : * This function sets the value of this string to @a __n copies of</a>
|
||
|
<a name="4413"><span class="lineNum"> 4413 </span> : : * character @a __c.</a>
|
||
|
<a name="4414"><span class="lineNum"> 4414 </span> : : */</a>
|
||
|
<a name="4415"><span class="lineNum"> 4415 </span> : : basic_string&</a>
|
||
|
<a name="4416"><span class="lineNum"> 4416 </span> : : assign(size_type __n, _CharT __c)</a>
|
||
|
<a name="4417"><span class="lineNum"> 4417 </span> : : { return _M_replace_aux(size_type(0), this->size(), __n, __c); }</a>
|
||
|
<a name="4418"><span class="lineNum"> 4418 </span> : : </a>
|
||
|
<a name="4419"><span class="lineNum"> 4419 </span> : : /**</a>
|
||
|
<a name="4420"><span class="lineNum"> 4420 </span> : : * @brief Set value to a range of characters.</a>
|
||
|
<a name="4421"><span class="lineNum"> 4421 </span> : : * @param __first Iterator referencing the first character to append.</a>
|
||
|
<a name="4422"><span class="lineNum"> 4422 </span> : : * @param __last Iterator marking the end of the range.</a>
|
||
|
<a name="4423"><span class="lineNum"> 4423 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4424"><span class="lineNum"> 4424 </span> : : *</a>
|
||
|
<a name="4425"><span class="lineNum"> 4425 </span> : : * Sets value of string to characters in the range [__first,__last).</a>
|
||
|
<a name="4426"><span class="lineNum"> 4426 </span> : : */</a>
|
||
|
<a name="4427"><span class="lineNum"> 4427 </span> : : template<class _InputIterator></a>
|
||
|
<a name="4428"><span class="lineNum"> 4428 </span> : : basic_string&</a>
|
||
|
<a name="4429"><span class="lineNum"> 4429 </span> : : assign(_InputIterator __first, _InputIterator __last)</a>
|
||
|
<a name="4430"><span class="lineNum"> 4430 </span> : : { return this->replace(_M_ibegin(), _M_iend(), __first, __last); }</a>
|
||
|
<a name="4431"><span class="lineNum"> 4431 </span> : : </a>
|
||
|
<a name="4432"><span class="lineNum"> 4432 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="4433"><span class="lineNum"> 4433 </span> : : /**</a>
|
||
|
<a name="4434"><span class="lineNum"> 4434 </span> : : * @brief Set value to an initializer_list of characters.</a>
|
||
|
<a name="4435"><span class="lineNum"> 4435 </span> : : * @param __l The initializer_list of characters to assign.</a>
|
||
|
<a name="4436"><span class="lineNum"> 4436 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4437"><span class="lineNum"> 4437 </span> : : */</a>
|
||
|
<a name="4438"><span class="lineNum"> 4438 </span> : : basic_string&</a>
|
||
|
<a name="4439"><span class="lineNum"> 4439 </span> : : assign(initializer_list<_CharT> __l)</a>
|
||
|
<a name="4440"><span class="lineNum"> 4440 </span> : : { return this->assign(__l.begin(), __l.size()); }</a>
|
||
|
<a name="4441"><span class="lineNum"> 4441 </span> : : #endif // C++11</a>
|
||
|
<a name="4442"><span class="lineNum"> 4442 </span> : : </a>
|
||
|
<a name="4443"><span class="lineNum"> 4443 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="4444"><span class="lineNum"> 4444 </span> : : /**</a>
|
||
|
<a name="4445"><span class="lineNum"> 4445 </span> : : * @brief Set value from a string_view.</a>
|
||
|
<a name="4446"><span class="lineNum"> 4446 </span> : : * @param __svt The source object convertible to string_view.</a>
|
||
|
<a name="4447"><span class="lineNum"> 4447 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4448"><span class="lineNum"> 4448 </span> : : */</a>
|
||
|
<a name="4449"><span class="lineNum"> 4449 </span> : : template<typename _Tp></a>
|
||
|
<a name="4450"><span class="lineNum"> 4450 </span> : : _If_sv<_Tp, basic_string&></a>
|
||
|
<a name="4451"><span class="lineNum"> 4451 </span> : : assign(const _Tp& __svt)</a>
|
||
|
<a name="4452"><span class="lineNum"> 4452 </span> : : {</a>
|
||
|
<a name="4453"><span class="lineNum"> 4453 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="4454"><span class="lineNum"> 4454 </span> : : return this->assign(__sv.data(), __sv.size());</a>
|
||
|
<a name="4455"><span class="lineNum"> 4455 </span> : : }</a>
|
||
|
<a name="4456"><span class="lineNum"> 4456 </span> : : </a>
|
||
|
<a name="4457"><span class="lineNum"> 4457 </span> : : /**</a>
|
||
|
<a name="4458"><span class="lineNum"> 4458 </span> : : * @brief Set value from a range of characters in a string_view.</a>
|
||
|
<a name="4459"><span class="lineNum"> 4459 </span> : : * @param __svt The source object convertible to string_view.</a>
|
||
|
<a name="4460"><span class="lineNum"> 4460 </span> : : * @param __pos The position in the string_view to assign from.</a>
|
||
|
<a name="4461"><span class="lineNum"> 4461 </span> : : * @param __n The number of characters to assign.</a>
|
||
|
<a name="4462"><span class="lineNum"> 4462 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4463"><span class="lineNum"> 4463 </span> : : */</a>
|
||
|
<a name="4464"><span class="lineNum"> 4464 </span> : : template<typename _Tp></a>
|
||
|
<a name="4465"><span class="lineNum"> 4465 </span> : : _If_sv<_Tp, basic_string&></a>
|
||
|
<a name="4466"><span class="lineNum"> 4466 </span> : : assign(const _Tp& __svt, size_type __pos, size_type __n = npos)</a>
|
||
|
<a name="4467"><span class="lineNum"> 4467 </span> : : {</a>
|
||
|
<a name="4468"><span class="lineNum"> 4468 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="4469"><span class="lineNum"> 4469 </span> : : return assign(__sv.data()</a>
|
||
|
<a name="4470"><span class="lineNum"> 4470 </span> : : + std::__sv_check(__sv.size(), __pos, "basic_string::assign"),</a>
|
||
|
<a name="4471"><span class="lineNum"> 4471 </span> : : std::__sv_limit(__sv.size(), __pos, __n));</a>
|
||
|
<a name="4472"><span class="lineNum"> 4472 </span> : : }</a>
|
||
|
<a name="4473"><span class="lineNum"> 4473 </span> : : #endif // C++17</a>
|
||
|
<a name="4474"><span class="lineNum"> 4474 </span> : : </a>
|
||
|
<a name="4475"><span class="lineNum"> 4475 </span> : : /**</a>
|
||
|
<a name="4476"><span class="lineNum"> 4476 </span> : : * @brief Insert multiple characters.</a>
|
||
|
<a name="4477"><span class="lineNum"> 4477 </span> : : * @param __p Iterator referencing location in string to insert at.</a>
|
||
|
<a name="4478"><span class="lineNum"> 4478 </span> : : * @param __n Number of characters to insert</a>
|
||
|
<a name="4479"><span class="lineNum"> 4479 </span> : : * @param __c The character to insert.</a>
|
||
|
<a name="4480"><span class="lineNum"> 4480 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="4481"><span class="lineNum"> 4481 </span> : : *</a>
|
||
|
<a name="4482"><span class="lineNum"> 4482 </span> : : * Inserts @a __n copies of character @a __c starting at the</a>
|
||
|
<a name="4483"><span class="lineNum"> 4483 </span> : : * position referenced by iterator @a __p. If adding</a>
|
||
|
<a name="4484"><span class="lineNum"> 4484 </span> : : * characters causes the length to exceed max_size(),</a>
|
||
|
<a name="4485"><span class="lineNum"> 4485 </span> : : * length_error is thrown. The value of the string doesn't</a>
|
||
|
<a name="4486"><span class="lineNum"> 4486 </span> : : * change if an error is thrown.</a>
|
||
|
<a name="4487"><span class="lineNum"> 4487 </span> : : */</a>
|
||
|
<a name="4488"><span class="lineNum"> 4488 </span> : : void</a>
|
||
|
<a name="4489"><span class="lineNum"> 4489 </span> : : insert(iterator __p, size_type __n, _CharT __c)</a>
|
||
|
<a name="4490"><span class="lineNum"> 4490 </span> : : { this->replace(__p, __p, __n, __c); }</a>
|
||
|
<a name="4491"><span class="lineNum"> 4491 </span> : : </a>
|
||
|
<a name="4492"><span class="lineNum"> 4492 </span> : : /**</a>
|
||
|
<a name="4493"><span class="lineNum"> 4493 </span> : : * @brief Insert a range of characters.</a>
|
||
|
<a name="4494"><span class="lineNum"> 4494 </span> : : * @param __p Iterator referencing location in string to insert at.</a>
|
||
|
<a name="4495"><span class="lineNum"> 4495 </span> : : * @param __beg Start of range.</a>
|
||
|
<a name="4496"><span class="lineNum"> 4496 </span> : : * @param __end End of range.</a>
|
||
|
<a name="4497"><span class="lineNum"> 4497 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="4498"><span class="lineNum"> 4498 </span> : : *</a>
|
||
|
<a name="4499"><span class="lineNum"> 4499 </span> : : * Inserts characters in range [__beg,__end). If adding</a>
|
||
|
<a name="4500"><span class="lineNum"> 4500 </span> : : * characters causes the length to exceed max_size(),</a>
|
||
|
<a name="4501"><span class="lineNum"> 4501 </span> : : * length_error is thrown. The value of the string doesn't</a>
|
||
|
<a name="4502"><span class="lineNum"> 4502 </span> : : * change if an error is thrown.</a>
|
||
|
<a name="4503"><span class="lineNum"> 4503 </span> : : */</a>
|
||
|
<a name="4504"><span class="lineNum"> 4504 </span> : : template<class _InputIterator></a>
|
||
|
<a name="4505"><span class="lineNum"> 4505 </span> : : void</a>
|
||
|
<a name="4506"><span class="lineNum"> 4506 </span> : : insert(iterator __p, _InputIterator __beg, _InputIterator __end)</a>
|
||
|
<a name="4507"><span class="lineNum"> 4507 </span> : : { this->replace(__p, __p, __beg, __end); }</a>
|
||
|
<a name="4508"><span class="lineNum"> 4508 </span> : : </a>
|
||
|
<a name="4509"><span class="lineNum"> 4509 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="4510"><span class="lineNum"> 4510 </span> : : /**</a>
|
||
|
<a name="4511"><span class="lineNum"> 4511 </span> : : * @brief Insert an initializer_list of characters.</a>
|
||
|
<a name="4512"><span class="lineNum"> 4512 </span> : : * @param __p Iterator referencing location in string to insert at.</a>
|
||
|
<a name="4513"><span class="lineNum"> 4513 </span> : : * @param __l The initializer_list of characters to insert.</a>
|
||
|
<a name="4514"><span class="lineNum"> 4514 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="4515"><span class="lineNum"> 4515 </span> : : */</a>
|
||
|
<a name="4516"><span class="lineNum"> 4516 </span> : : void</a>
|
||
|
<a name="4517"><span class="lineNum"> 4517 </span> : : insert(iterator __p, initializer_list<_CharT> __l)</a>
|
||
|
<a name="4518"><span class="lineNum"> 4518 </span> : : {</a>
|
||
|
<a name="4519"><span class="lineNum"> 4519 </span> : : _GLIBCXX_DEBUG_PEDASSERT(__p >= _M_ibegin() && __p <= _M_iend());</a>
|
||
|
<a name="4520"><span class="lineNum"> 4520 </span> : : this->insert(__p - _M_ibegin(), __l.begin(), __l.size());</a>
|
||
|
<a name="4521"><span class="lineNum"> 4521 </span> : : }</a>
|
||
|
<a name="4522"><span class="lineNum"> 4522 </span> : : #endif // C++11</a>
|
||
|
<a name="4523"><span class="lineNum"> 4523 </span> : : </a>
|
||
|
<a name="4524"><span class="lineNum"> 4524 </span> : : /**</a>
|
||
|
<a name="4525"><span class="lineNum"> 4525 </span> : : * @brief Insert value of a string.</a>
|
||
|
<a name="4526"><span class="lineNum"> 4526 </span> : : * @param __pos1 Iterator referencing location in string to insert at.</a>
|
||
|
<a name="4527"><span class="lineNum"> 4527 </span> : : * @param __str The string to insert.</a>
|
||
|
<a name="4528"><span class="lineNum"> 4528 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4529"><span class="lineNum"> 4529 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="4530"><span class="lineNum"> 4530 </span> : : *</a>
|
||
|
<a name="4531"><span class="lineNum"> 4531 </span> : : * Inserts value of @a __str starting at @a __pos1. If adding</a>
|
||
|
<a name="4532"><span class="lineNum"> 4532 </span> : : * characters causes the length to exceed max_size(),</a>
|
||
|
<a name="4533"><span class="lineNum"> 4533 </span> : : * length_error is thrown. The value of the string doesn't</a>
|
||
|
<a name="4534"><span class="lineNum"> 4534 </span> : : * change if an error is thrown.</a>
|
||
|
<a name="4535"><span class="lineNum"> 4535 </span> : : */</a>
|
||
|
<a name="4536"><span class="lineNum"> 4536 </span> : : basic_string&</a>
|
||
|
<a name="4537"><span class="lineNum"> 4537 </span> : : insert(size_type __pos1, const basic_string& __str)</a>
|
||
|
<a name="4538"><span class="lineNum"> 4538 </span> : : { return this->insert(__pos1, __str, size_type(0), __str.size()); }</a>
|
||
|
<a name="4539"><span class="lineNum"> 4539 </span> : : </a>
|
||
|
<a name="4540"><span class="lineNum"> 4540 </span> : : /**</a>
|
||
|
<a name="4541"><span class="lineNum"> 4541 </span> : : * @brief Insert a substring.</a>
|
||
|
<a name="4542"><span class="lineNum"> 4542 </span> : : * @param __pos1 Iterator referencing location in string to insert at.</a>
|
||
|
<a name="4543"><span class="lineNum"> 4543 </span> : : * @param __str The string to insert.</a>
|
||
|
<a name="4544"><span class="lineNum"> 4544 </span> : : * @param __pos2 Start of characters in str to insert.</a>
|
||
|
<a name="4545"><span class="lineNum"> 4545 </span> : : * @param __n Number of characters to insert.</a>
|
||
|
<a name="4546"><span class="lineNum"> 4546 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4547"><span class="lineNum"> 4547 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="4548"><span class="lineNum"> 4548 </span> : : * @throw std::out_of_range If @a pos1 > size() or</a>
|
||
|
<a name="4549"><span class="lineNum"> 4549 </span> : : * @a __pos2 > @a str.size().</a>
|
||
|
<a name="4550"><span class="lineNum"> 4550 </span> : : *</a>
|
||
|
<a name="4551"><span class="lineNum"> 4551 </span> : : * Starting at @a pos1, insert @a __n character of @a __str</a>
|
||
|
<a name="4552"><span class="lineNum"> 4552 </span> : : * beginning with @a __pos2. If adding characters causes the</a>
|
||
|
<a name="4553"><span class="lineNum"> 4553 </span> : : * length to exceed max_size(), length_error is thrown. If @a</a>
|
||
|
<a name="4554"><span class="lineNum"> 4554 </span> : : * __pos1 is beyond the end of this string or @a __pos2 is</a>
|
||
|
<a name="4555"><span class="lineNum"> 4555 </span> : : * beyond the end of @a __str, out_of_range is thrown. The</a>
|
||
|
<a name="4556"><span class="lineNum"> 4556 </span> : : * value of the string doesn't change if an error is thrown.</a>
|
||
|
<a name="4557"><span class="lineNum"> 4557 </span> : : */</a>
|
||
|
<a name="4558"><span class="lineNum"> 4558 </span> : : basic_string&</a>
|
||
|
<a name="4559"><span class="lineNum"> 4559 </span> : : insert(size_type __pos1, const basic_string& __str,</a>
|
||
|
<a name="4560"><span class="lineNum"> 4560 </span> : : size_type __pos2, size_type __n = npos)</a>
|
||
|
<a name="4561"><span class="lineNum"> 4561 </span> : : { return this->insert(__pos1, __str._M_data()</a>
|
||
|
<a name="4562"><span class="lineNum"> 4562 </span> : : + __str._M_check(__pos2, "basic_string::insert"),</a>
|
||
|
<a name="4563"><span class="lineNum"> 4563 </span> : : __str._M_limit(__pos2, __n)); }</a>
|
||
|
<a name="4564"><span class="lineNum"> 4564 </span> : : </a>
|
||
|
<a name="4565"><span class="lineNum"> 4565 </span> : : /**</a>
|
||
|
<a name="4566"><span class="lineNum"> 4566 </span> : : * @brief Insert a C substring.</a>
|
||
|
<a name="4567"><span class="lineNum"> 4567 </span> : : * @param __pos Iterator referencing location in string to insert at.</a>
|
||
|
<a name="4568"><span class="lineNum"> 4568 </span> : : * @param __s The C string to insert.</a>
|
||
|
<a name="4569"><span class="lineNum"> 4569 </span> : : * @param __n The number of characters to insert.</a>
|
||
|
<a name="4570"><span class="lineNum"> 4570 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4571"><span class="lineNum"> 4571 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="4572"><span class="lineNum"> 4572 </span> : : * @throw std::out_of_range If @a __pos is beyond the end of this</a>
|
||
|
<a name="4573"><span class="lineNum"> 4573 </span> : : * string.</a>
|
||
|
<a name="4574"><span class="lineNum"> 4574 </span> : : *</a>
|
||
|
<a name="4575"><span class="lineNum"> 4575 </span> : : * Inserts the first @a __n characters of @a __s starting at @a</a>
|
||
|
<a name="4576"><span class="lineNum"> 4576 </span> : : * __pos. If adding characters causes the length to exceed</a>
|
||
|
<a name="4577"><span class="lineNum"> 4577 </span> : : * max_size(), length_error is thrown. If @a __pos is beyond</a>
|
||
|
<a name="4578"><span class="lineNum"> 4578 </span> : : * end(), out_of_range is thrown. The value of the string</a>
|
||
|
<a name="4579"><span class="lineNum"> 4579 </span> : : * doesn't change if an error is thrown.</a>
|
||
|
<a name="4580"><span class="lineNum"> 4580 </span> : : */</a>
|
||
|
<a name="4581"><span class="lineNum"> 4581 </span> : : basic_string&</a>
|
||
|
<a name="4582"><span class="lineNum"> 4582 </span> : : insert(size_type __pos, const _CharT* __s, size_type __n);</a>
|
||
|
<a name="4583"><span class="lineNum"> 4583 </span> : : </a>
|
||
|
<a name="4584"><span class="lineNum"> 4584 </span> : : /**</a>
|
||
|
<a name="4585"><span class="lineNum"> 4585 </span> : : * @brief Insert a C string.</a>
|
||
|
<a name="4586"><span class="lineNum"> 4586 </span> : : * @param __pos Iterator referencing location in string to insert at.</a>
|
||
|
<a name="4587"><span class="lineNum"> 4587 </span> : : * @param __s The C string to insert.</a>
|
||
|
<a name="4588"><span class="lineNum"> 4588 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4589"><span class="lineNum"> 4589 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="4590"><span class="lineNum"> 4590 </span> : : * @throw std::out_of_range If @a pos is beyond the end of this</a>
|
||
|
<a name="4591"><span class="lineNum"> 4591 </span> : : * string.</a>
|
||
|
<a name="4592"><span class="lineNum"> 4592 </span> : : *</a>
|
||
|
<a name="4593"><span class="lineNum"> 4593 </span> : : * Inserts the first @a n characters of @a __s starting at @a __pos. If</a>
|
||
|
<a name="4594"><span class="lineNum"> 4594 </span> : : * adding characters causes the length to exceed max_size(),</a>
|
||
|
<a name="4595"><span class="lineNum"> 4595 </span> : : * length_error is thrown. If @a __pos is beyond end(), out_of_range is</a>
|
||
|
<a name="4596"><span class="lineNum"> 4596 </span> : : * thrown. The value of the string doesn't change if an error is</a>
|
||
|
<a name="4597"><span class="lineNum"> 4597 </span> : : * thrown.</a>
|
||
|
<a name="4598"><span class="lineNum"> 4598 </span> : : */</a>
|
||
|
<a name="4599"><span class="lineNum"> 4599 </span> : : basic_string&</a>
|
||
|
<a name="4600"><span class="lineNum"> 4600 </span> : : insert(size_type __pos, const _CharT* __s)</a>
|
||
|
<a name="4601"><span class="lineNum"> 4601 </span> : : {</a>
|
||
|
<a name="4602"><span class="lineNum"> 4602 </span> : : __glibcxx_requires_string(__s);</a>
|
||
|
<a name="4603"><span class="lineNum"> 4603 </span> : : return this->insert(__pos, __s, traits_type::length(__s));</a>
|
||
|
<a name="4604"><span class="lineNum"> 4604 </span> : : }</a>
|
||
|
<a name="4605"><span class="lineNum"> 4605 </span> : : </a>
|
||
|
<a name="4606"><span class="lineNum"> 4606 </span> : : /**</a>
|
||
|
<a name="4607"><span class="lineNum"> 4607 </span> : : * @brief Insert multiple characters.</a>
|
||
|
<a name="4608"><span class="lineNum"> 4608 </span> : : * @param __pos Index in string to insert at.</a>
|
||
|
<a name="4609"><span class="lineNum"> 4609 </span> : : * @param __n Number of characters to insert</a>
|
||
|
<a name="4610"><span class="lineNum"> 4610 </span> : : * @param __c The character to insert.</a>
|
||
|
<a name="4611"><span class="lineNum"> 4611 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4612"><span class="lineNum"> 4612 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="4613"><span class="lineNum"> 4613 </span> : : * @throw std::out_of_range If @a __pos is beyond the end of this</a>
|
||
|
<a name="4614"><span class="lineNum"> 4614 </span> : : * string.</a>
|
||
|
<a name="4615"><span class="lineNum"> 4615 </span> : : *</a>
|
||
|
<a name="4616"><span class="lineNum"> 4616 </span> : : * Inserts @a __n copies of character @a __c starting at index</a>
|
||
|
<a name="4617"><span class="lineNum"> 4617 </span> : : * @a __pos. If adding characters causes the length to exceed</a>
|
||
|
<a name="4618"><span class="lineNum"> 4618 </span> : : * max_size(), length_error is thrown. If @a __pos > length(),</a>
|
||
|
<a name="4619"><span class="lineNum"> 4619 </span> : : * out_of_range is thrown. The value of the string doesn't</a>
|
||
|
<a name="4620"><span class="lineNum"> 4620 </span> : : * change if an error is thrown.</a>
|
||
|
<a name="4621"><span class="lineNum"> 4621 </span> : : */</a>
|
||
|
<a name="4622"><span class="lineNum"> 4622 </span> : : basic_string&</a>
|
||
|
<a name="4623"><span class="lineNum"> 4623 </span> : : insert(size_type __pos, size_type __n, _CharT __c)</a>
|
||
|
<a name="4624"><span class="lineNum"> 4624 </span> : : { return _M_replace_aux(_M_check(__pos, "basic_string::insert"),</a>
|
||
|
<a name="4625"><span class="lineNum"> 4625 </span> : : size_type(0), __n, __c); }</a>
|
||
|
<a name="4626"><span class="lineNum"> 4626 </span> : : </a>
|
||
|
<a name="4627"><span class="lineNum"> 4627 </span> : : /**</a>
|
||
|
<a name="4628"><span class="lineNum"> 4628 </span> : : * @brief Insert one character.</a>
|
||
|
<a name="4629"><span class="lineNum"> 4629 </span> : : * @param __p Iterator referencing position in string to insert at.</a>
|
||
|
<a name="4630"><span class="lineNum"> 4630 </span> : : * @param __c The character to insert.</a>
|
||
|
<a name="4631"><span class="lineNum"> 4631 </span> : : * @return Iterator referencing newly inserted char.</a>
|
||
|
<a name="4632"><span class="lineNum"> 4632 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="4633"><span class="lineNum"> 4633 </span> : : *</a>
|
||
|
<a name="4634"><span class="lineNum"> 4634 </span> : : * Inserts character @a __c at position referenced by @a __p.</a>
|
||
|
<a name="4635"><span class="lineNum"> 4635 </span> : : * If adding character causes the length to exceed max_size(),</a>
|
||
|
<a name="4636"><span class="lineNum"> 4636 </span> : : * length_error is thrown. If @a __p is beyond end of string,</a>
|
||
|
<a name="4637"><span class="lineNum"> 4637 </span> : : * out_of_range is thrown. The value of the string doesn't</a>
|
||
|
<a name="4638"><span class="lineNum"> 4638 </span> : : * change if an error is thrown.</a>
|
||
|
<a name="4639"><span class="lineNum"> 4639 </span> : : */</a>
|
||
|
<a name="4640"><span class="lineNum"> 4640 </span> : : iterator</a>
|
||
|
<a name="4641"><span class="lineNum"> 4641 </span> : : insert(iterator __p, _CharT __c)</a>
|
||
|
<a name="4642"><span class="lineNum"> 4642 </span> : : {</a>
|
||
|
<a name="4643"><span class="lineNum"> 4643 </span> : : _GLIBCXX_DEBUG_PEDASSERT(__p >= _M_ibegin() && __p <= _M_iend());</a>
|
||
|
<a name="4644"><span class="lineNum"> 4644 </span> : : const size_type __pos = __p - _M_ibegin();</a>
|
||
|
<a name="4645"><span class="lineNum"> 4645 </span> : : _M_replace_aux(__pos, size_type(0), size_type(1), __c);</a>
|
||
|
<a name="4646"><span class="lineNum"> 4646 </span> : : _M_rep()->_M_set_leaked();</a>
|
||
|
<a name="4647"><span class="lineNum"> 4647 </span> : : return iterator(_M_data() + __pos);</a>
|
||
|
<a name="4648"><span class="lineNum"> 4648 </span> : : }</a>
|
||
|
<a name="4649"><span class="lineNum"> 4649 </span> : : </a>
|
||
|
<a name="4650"><span class="lineNum"> 4650 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="4651"><span class="lineNum"> 4651 </span> : : /**</a>
|
||
|
<a name="4652"><span class="lineNum"> 4652 </span> : : * @brief Insert a string_view.</a>
|
||
|
<a name="4653"><span class="lineNum"> 4653 </span> : : * @param __pos Iterator referencing position in string to insert at.</a>
|
||
|
<a name="4654"><span class="lineNum"> 4654 </span> : : * @param __svt The object convertible to string_view to insert.</a>
|
||
|
<a name="4655"><span class="lineNum"> 4655 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4656"><span class="lineNum"> 4656 </span> : : */</a>
|
||
|
<a name="4657"><span class="lineNum"> 4657 </span> : : template<typename _Tp></a>
|
||
|
<a name="4658"><span class="lineNum"> 4658 </span> : : _If_sv<_Tp, basic_string&></a>
|
||
|
<a name="4659"><span class="lineNum"> 4659 </span> : : insert(size_type __pos, const _Tp& __svt)</a>
|
||
|
<a name="4660"><span class="lineNum"> 4660 </span> : : {</a>
|
||
|
<a name="4661"><span class="lineNum"> 4661 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="4662"><span class="lineNum"> 4662 </span> : : return this->insert(__pos, __sv.data(), __sv.size());</a>
|
||
|
<a name="4663"><span class="lineNum"> 4663 </span> : : }</a>
|
||
|
<a name="4664"><span class="lineNum"> 4664 </span> : : </a>
|
||
|
<a name="4665"><span class="lineNum"> 4665 </span> : : /**</a>
|
||
|
<a name="4666"><span class="lineNum"> 4666 </span> : : * @brief Insert a string_view.</a>
|
||
|
<a name="4667"><span class="lineNum"> 4667 </span> : : * @param __pos1 Position in string to insert at.</a>
|
||
|
<a name="4668"><span class="lineNum"> 4668 </span> : : * @param __svt The object convertible to string_view to insert from.</a>
|
||
|
<a name="4669"><span class="lineNum"> 4669 </span> : : * @param __pos2 Position in string_view to insert from.</a>
|
||
|
<a name="4670"><span class="lineNum"> 4670 </span> : : * @param __n The number of characters to insert.</a>
|
||
|
<a name="4671"><span class="lineNum"> 4671 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4672"><span class="lineNum"> 4672 </span> : : */</a>
|
||
|
<a name="4673"><span class="lineNum"> 4673 </span> : : template<typename _Tp></a>
|
||
|
<a name="4674"><span class="lineNum"> 4674 </span> : : _If_sv<_Tp, basic_string&></a>
|
||
|
<a name="4675"><span class="lineNum"> 4675 </span> : : insert(size_type __pos1, const _Tp& __svt,</a>
|
||
|
<a name="4676"><span class="lineNum"> 4676 </span> : : size_type __pos2, size_type __n = npos)</a>
|
||
|
<a name="4677"><span class="lineNum"> 4677 </span> : : {</a>
|
||
|
<a name="4678"><span class="lineNum"> 4678 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="4679"><span class="lineNum"> 4679 </span> : : return this->replace(__pos1, size_type(0), __sv.data()</a>
|
||
|
<a name="4680"><span class="lineNum"> 4680 </span> : : + std::__sv_check(__sv.size(), __pos2, "basic_string::insert"),</a>
|
||
|
<a name="4681"><span class="lineNum"> 4681 </span> : : std::__sv_limit(__sv.size(), __pos2, __n));</a>
|
||
|
<a name="4682"><span class="lineNum"> 4682 </span> : : }</a>
|
||
|
<a name="4683"><span class="lineNum"> 4683 </span> : : #endif // C++17</a>
|
||
|
<a name="4684"><span class="lineNum"> 4684 </span> : : </a>
|
||
|
<a name="4685"><span class="lineNum"> 4685 </span> : : /**</a>
|
||
|
<a name="4686"><span class="lineNum"> 4686 </span> : : * @brief Remove characters.</a>
|
||
|
<a name="4687"><span class="lineNum"> 4687 </span> : : * @param __pos Index of first character to remove (default 0).</a>
|
||
|
<a name="4688"><span class="lineNum"> 4688 </span> : : * @param __n Number of characters to remove (default remainder).</a>
|
||
|
<a name="4689"><span class="lineNum"> 4689 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4690"><span class="lineNum"> 4690 </span> : : * @throw std::out_of_range If @a pos is beyond the end of this</a>
|
||
|
<a name="4691"><span class="lineNum"> 4691 </span> : : * string.</a>
|
||
|
<a name="4692"><span class="lineNum"> 4692 </span> : : *</a>
|
||
|
<a name="4693"><span class="lineNum"> 4693 </span> : : * Removes @a __n characters from this string starting at @a</a>
|
||
|
<a name="4694"><span class="lineNum"> 4694 </span> : : * __pos. The length of the string is reduced by @a __n. If</a>
|
||
|
<a name="4695"><span class="lineNum"> 4695 </span> : : * there are < @a __n characters to remove, the remainder of</a>
|
||
|
<a name="4696"><span class="lineNum"> 4696 </span> : : * the string is truncated. If @a __p is beyond end of string,</a>
|
||
|
<a name="4697"><span class="lineNum"> 4697 </span> : : * out_of_range is thrown. The value of the string doesn't</a>
|
||
|
<a name="4698"><span class="lineNum"> 4698 </span> : : * change if an error is thrown.</a>
|
||
|
<a name="4699"><span class="lineNum"> 4699 </span> : : */</a>
|
||
|
<a name="4700"><span class="lineNum"> 4700 </span> : : basic_string&</a>
|
||
|
<a name="4701"><span class="lineNum"> 4701 </span> : : erase(size_type __pos = 0, size_type __n = npos)</a>
|
||
|
<a name="4702"><span class="lineNum"> 4702 </span> : : { </a>
|
||
|
<a name="4703"><span class="lineNum"> 4703 </span> : : _M_mutate(_M_check(__pos, "basic_string::erase"),</a>
|
||
|
<a name="4704"><span class="lineNum"> 4704 </span> : : _M_limit(__pos, __n), size_type(0));</a>
|
||
|
<a name="4705"><span class="lineNum"> 4705 </span> : : return *this;</a>
|
||
|
<a name="4706"><span class="lineNum"> 4706 </span> : : }</a>
|
||
|
<a name="4707"><span class="lineNum"> 4707 </span> : : </a>
|
||
|
<a name="4708"><span class="lineNum"> 4708 </span> : : /**</a>
|
||
|
<a name="4709"><span class="lineNum"> 4709 </span> : : * @brief Remove one character.</a>
|
||
|
<a name="4710"><span class="lineNum"> 4710 </span> : : * @param __position Iterator referencing the character to remove.</a>
|
||
|
<a name="4711"><span class="lineNum"> 4711 </span> : : * @return iterator referencing same location after removal.</a>
|
||
|
<a name="4712"><span class="lineNum"> 4712 </span> : : *</a>
|
||
|
<a name="4713"><span class="lineNum"> 4713 </span> : : * Removes the character at @a __position from this string. The value</a>
|
||
|
<a name="4714"><span class="lineNum"> 4714 </span> : : * of the string doesn't change if an error is thrown.</a>
|
||
|
<a name="4715"><span class="lineNum"> 4715 </span> : : */</a>
|
||
|
<a name="4716"><span class="lineNum"> 4716 </span> : : iterator</a>
|
||
|
<a name="4717"><span class="lineNum"> 4717 </span> : : erase(iterator __position)</a>
|
||
|
<a name="4718"><span class="lineNum"> 4718 </span> : : {</a>
|
||
|
<a name="4719"><span class="lineNum"> 4719 </span> : : _GLIBCXX_DEBUG_PEDASSERT(__position >= _M_ibegin()</a>
|
||
|
<a name="4720"><span class="lineNum"> 4720 </span> : : && __position < _M_iend());</a>
|
||
|
<a name="4721"><span class="lineNum"> 4721 </span> : : const size_type __pos = __position - _M_ibegin();</a>
|
||
|
<a name="4722"><span class="lineNum"> 4722 </span> : : _M_mutate(__pos, size_type(1), size_type(0));</a>
|
||
|
<a name="4723"><span class="lineNum"> 4723 </span> : : _M_rep()->_M_set_leaked();</a>
|
||
|
<a name="4724"><span class="lineNum"> 4724 </span> : : return iterator(_M_data() + __pos);</a>
|
||
|
<a name="4725"><span class="lineNum"> 4725 </span> : : }</a>
|
||
|
<a name="4726"><span class="lineNum"> 4726 </span> : : </a>
|
||
|
<a name="4727"><span class="lineNum"> 4727 </span> : : /**</a>
|
||
|
<a name="4728"><span class="lineNum"> 4728 </span> : : * @brief Remove a range of characters.</a>
|
||
|
<a name="4729"><span class="lineNum"> 4729 </span> : : * @param __first Iterator referencing the first character to remove.</a>
|
||
|
<a name="4730"><span class="lineNum"> 4730 </span> : : * @param __last Iterator referencing the end of the range.</a>
|
||
|
<a name="4731"><span class="lineNum"> 4731 </span> : : * @return Iterator referencing location of first after removal.</a>
|
||
|
<a name="4732"><span class="lineNum"> 4732 </span> : : *</a>
|
||
|
<a name="4733"><span class="lineNum"> 4733 </span> : : * Removes the characters in the range [first,last) from this string.</a>
|
||
|
<a name="4734"><span class="lineNum"> 4734 </span> : : * The value of the string doesn't change if an error is thrown.</a>
|
||
|
<a name="4735"><span class="lineNum"> 4735 </span> : : */</a>
|
||
|
<a name="4736"><span class="lineNum"> 4736 </span> : : iterator</a>
|
||
|
<a name="4737"><span class="lineNum"> 4737 </span> : : erase(iterator __first, iterator __last);</a>
|
||
|
<a name="4738"><span class="lineNum"> 4738 </span> : : </a>
|
||
|
<a name="4739"><span class="lineNum"> 4739 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="4740"><span class="lineNum"> 4740 </span> : : /**</a>
|
||
|
<a name="4741"><span class="lineNum"> 4741 </span> : : * @brief Remove the last character.</a>
|
||
|
<a name="4742"><span class="lineNum"> 4742 </span> : : *</a>
|
||
|
<a name="4743"><span class="lineNum"> 4743 </span> : : * The string must be non-empty.</a>
|
||
|
<a name="4744"><span class="lineNum"> 4744 </span> : : */</a>
|
||
|
<a name="4745"><span class="lineNum"> 4745 </span> : : void</a>
|
||
|
<a name="4746"><span class="lineNum"> 4746 </span> : : pop_back() // FIXME C++11: should be noexcept.</a>
|
||
|
<a name="4747"><span class="lineNum"> 4747 </span> : : {</a>
|
||
|
<a name="4748"><span class="lineNum"> 4748 </span> : : __glibcxx_assert(!empty());</a>
|
||
|
<a name="4749"><span class="lineNum"> 4749 </span> : : erase(size() - 1, 1);</a>
|
||
|
<a name="4750"><span class="lineNum"> 4750 </span> : : }</a>
|
||
|
<a name="4751"><span class="lineNum"> 4751 </span> : : #endif // C++11</a>
|
||
|
<a name="4752"><span class="lineNum"> 4752 </span> : : </a>
|
||
|
<a name="4753"><span class="lineNum"> 4753 </span> : : /**</a>
|
||
|
<a name="4754"><span class="lineNum"> 4754 </span> : : * @brief Replace characters with value from another string.</a>
|
||
|
<a name="4755"><span class="lineNum"> 4755 </span> : : * @param __pos Index of first character to replace.</a>
|
||
|
<a name="4756"><span class="lineNum"> 4756 </span> : : * @param __n Number of characters to be replaced.</a>
|
||
|
<a name="4757"><span class="lineNum"> 4757 </span> : : * @param __str String to insert.</a>
|
||
|
<a name="4758"><span class="lineNum"> 4758 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4759"><span class="lineNum"> 4759 </span> : : * @throw std::out_of_range If @a pos is beyond the end of this</a>
|
||
|
<a name="4760"><span class="lineNum"> 4760 </span> : : * string.</a>
|
||
|
<a name="4761"><span class="lineNum"> 4761 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="4762"><span class="lineNum"> 4762 </span> : : *</a>
|
||
|
<a name="4763"><span class="lineNum"> 4763 </span> : : * Removes the characters in the range [__pos,__pos+__n) from</a>
|
||
|
<a name="4764"><span class="lineNum"> 4764 </span> : : * this string. In place, the value of @a __str is inserted.</a>
|
||
|
<a name="4765"><span class="lineNum"> 4765 </span> : : * If @a __pos is beyond end of string, out_of_range is thrown.</a>
|
||
|
<a name="4766"><span class="lineNum"> 4766 </span> : : * If the length of the result exceeds max_size(), length_error</a>
|
||
|
<a name="4767"><span class="lineNum"> 4767 </span> : : * is thrown. The value of the string doesn't change if an</a>
|
||
|
<a name="4768"><span class="lineNum"> 4768 </span> : : * error is thrown.</a>
|
||
|
<a name="4769"><span class="lineNum"> 4769 </span> : : */</a>
|
||
|
<a name="4770"><span class="lineNum"> 4770 </span> : : basic_string&</a>
|
||
|
<a name="4771"><span class="lineNum"> 4771 </span> : : replace(size_type __pos, size_type __n, const basic_string& __str)</a>
|
||
|
<a name="4772"><span class="lineNum"> 4772 </span> : : { return this->replace(__pos, __n, __str._M_data(), __str.size()); }</a>
|
||
|
<a name="4773"><span class="lineNum"> 4773 </span> : : </a>
|
||
|
<a name="4774"><span class="lineNum"> 4774 </span> : : /**</a>
|
||
|
<a name="4775"><span class="lineNum"> 4775 </span> : : * @brief Replace characters with value from another string.</a>
|
||
|
<a name="4776"><span class="lineNum"> 4776 </span> : : * @param __pos1 Index of first character to replace.</a>
|
||
|
<a name="4777"><span class="lineNum"> 4777 </span> : : * @param __n1 Number of characters to be replaced.</a>
|
||
|
<a name="4778"><span class="lineNum"> 4778 </span> : : * @param __str String to insert.</a>
|
||
|
<a name="4779"><span class="lineNum"> 4779 </span> : : * @param __pos2 Index of first character of str to use.</a>
|
||
|
<a name="4780"><span class="lineNum"> 4780 </span> : : * @param __n2 Number of characters from str to use.</a>
|
||
|
<a name="4781"><span class="lineNum"> 4781 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4782"><span class="lineNum"> 4782 </span> : : * @throw std::out_of_range If @a __pos1 > size() or @a __pos2 ></a>
|
||
|
<a name="4783"><span class="lineNum"> 4783 </span> : : * __str.size().</a>
|
||
|
<a name="4784"><span class="lineNum"> 4784 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="4785"><span class="lineNum"> 4785 </span> : : *</a>
|
||
|
<a name="4786"><span class="lineNum"> 4786 </span> : : * Removes the characters in the range [__pos1,__pos1 + n) from this</a>
|
||
|
<a name="4787"><span class="lineNum"> 4787 </span> : : * string. In place, the value of @a __str is inserted. If @a __pos is</a>
|
||
|
<a name="4788"><span class="lineNum"> 4788 </span> : : * beyond end of string, out_of_range is thrown. If the length of the</a>
|
||
|
<a name="4789"><span class="lineNum"> 4789 </span> : : * result exceeds max_size(), length_error is thrown. The value of the</a>
|
||
|
<a name="4790"><span class="lineNum"> 4790 </span> : : * string doesn't change if an error is thrown.</a>
|
||
|
<a name="4791"><span class="lineNum"> 4791 </span> : : */</a>
|
||
|
<a name="4792"><span class="lineNum"> 4792 </span> : : basic_string&</a>
|
||
|
<a name="4793"><span class="lineNum"> 4793 </span> : : replace(size_type __pos1, size_type __n1, const basic_string& __str,</a>
|
||
|
<a name="4794"><span class="lineNum"> 4794 </span> : : size_type __pos2, size_type __n2 = npos)</a>
|
||
|
<a name="4795"><span class="lineNum"> 4795 </span> : : { return this->replace(__pos1, __n1, __str._M_data()</a>
|
||
|
<a name="4796"><span class="lineNum"> 4796 </span> : : + __str._M_check(__pos2, "basic_string::replace"),</a>
|
||
|
<a name="4797"><span class="lineNum"> 4797 </span> : : __str._M_limit(__pos2, __n2)); }</a>
|
||
|
<a name="4798"><span class="lineNum"> 4798 </span> : : </a>
|
||
|
<a name="4799"><span class="lineNum"> 4799 </span> : : /**</a>
|
||
|
<a name="4800"><span class="lineNum"> 4800 </span> : : * @brief Replace characters with value of a C substring.</a>
|
||
|
<a name="4801"><span class="lineNum"> 4801 </span> : : * @param __pos Index of first character to replace.</a>
|
||
|
<a name="4802"><span class="lineNum"> 4802 </span> : : * @param __n1 Number of characters to be replaced.</a>
|
||
|
<a name="4803"><span class="lineNum"> 4803 </span> : : * @param __s C string to insert.</a>
|
||
|
<a name="4804"><span class="lineNum"> 4804 </span> : : * @param __n2 Number of characters from @a s to use.</a>
|
||
|
<a name="4805"><span class="lineNum"> 4805 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4806"><span class="lineNum"> 4806 </span> : : * @throw std::out_of_range If @a pos1 > size().</a>
|
||
|
<a name="4807"><span class="lineNum"> 4807 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="4808"><span class="lineNum"> 4808 </span> : : *</a>
|
||
|
<a name="4809"><span class="lineNum"> 4809 </span> : : * Removes the characters in the range [__pos,__pos + __n1)</a>
|
||
|
<a name="4810"><span class="lineNum"> 4810 </span> : : * from this string. In place, the first @a __n2 characters of</a>
|
||
|
<a name="4811"><span class="lineNum"> 4811 </span> : : * @a __s are inserted, or all of @a __s if @a __n2 is too large. If</a>
|
||
|
<a name="4812"><span class="lineNum"> 4812 </span> : : * @a __pos is beyond end of string, out_of_range is thrown. If</a>
|
||
|
<a name="4813"><span class="lineNum"> 4813 </span> : : * the length of result exceeds max_size(), length_error is</a>
|
||
|
<a name="4814"><span class="lineNum"> 4814 </span> : : * thrown. The value of the string doesn't change if an error</a>
|
||
|
<a name="4815"><span class="lineNum"> 4815 </span> : : * is thrown.</a>
|
||
|
<a name="4816"><span class="lineNum"> 4816 </span> : : */</a>
|
||
|
<a name="4817"><span class="lineNum"> 4817 </span> : : basic_string&</a>
|
||
|
<a name="4818"><span class="lineNum"> 4818 </span> : : replace(size_type __pos, size_type __n1, const _CharT* __s,</a>
|
||
|
<a name="4819"><span class="lineNum"> 4819 </span> : : size_type __n2);</a>
|
||
|
<a name="4820"><span class="lineNum"> 4820 </span> : : </a>
|
||
|
<a name="4821"><span class="lineNum"> 4821 </span> : : /**</a>
|
||
|
<a name="4822"><span class="lineNum"> 4822 </span> : : * @brief Replace characters with value of a C string.</a>
|
||
|
<a name="4823"><span class="lineNum"> 4823 </span> : : * @param __pos Index of first character to replace.</a>
|
||
|
<a name="4824"><span class="lineNum"> 4824 </span> : : * @param __n1 Number of characters to be replaced.</a>
|
||
|
<a name="4825"><span class="lineNum"> 4825 </span> : : * @param __s C string to insert.</a>
|
||
|
<a name="4826"><span class="lineNum"> 4826 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4827"><span class="lineNum"> 4827 </span> : : * @throw std::out_of_range If @a pos > size().</a>
|
||
|
<a name="4828"><span class="lineNum"> 4828 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="4829"><span class="lineNum"> 4829 </span> : : *</a>
|
||
|
<a name="4830"><span class="lineNum"> 4830 </span> : : * Removes the characters in the range [__pos,__pos + __n1)</a>
|
||
|
<a name="4831"><span class="lineNum"> 4831 </span> : : * from this string. In place, the characters of @a __s are</a>
|
||
|
<a name="4832"><span class="lineNum"> 4832 </span> : : * inserted. If @a __pos is beyond end of string, out_of_range</a>
|
||
|
<a name="4833"><span class="lineNum"> 4833 </span> : : * is thrown. If the length of result exceeds max_size(),</a>
|
||
|
<a name="4834"><span class="lineNum"> 4834 </span> : : * length_error is thrown. The value of the string doesn't</a>
|
||
|
<a name="4835"><span class="lineNum"> 4835 </span> : : * change if an error is thrown.</a>
|
||
|
<a name="4836"><span class="lineNum"> 4836 </span> : : */</a>
|
||
|
<a name="4837"><span class="lineNum"> 4837 </span> : : basic_string&</a>
|
||
|
<a name="4838"><span class="lineNum"> 4838 </span> : : replace(size_type __pos, size_type __n1, const _CharT* __s)</a>
|
||
|
<a name="4839"><span class="lineNum"> 4839 </span> : : {</a>
|
||
|
<a name="4840"><span class="lineNum"> 4840 </span> : : __glibcxx_requires_string(__s);</a>
|
||
|
<a name="4841"><span class="lineNum"> 4841 </span> : : return this->replace(__pos, __n1, __s, traits_type::length(__s));</a>
|
||
|
<a name="4842"><span class="lineNum"> 4842 </span> : : }</a>
|
||
|
<a name="4843"><span class="lineNum"> 4843 </span> : : </a>
|
||
|
<a name="4844"><span class="lineNum"> 4844 </span> : : /**</a>
|
||
|
<a name="4845"><span class="lineNum"> 4845 </span> : : * @brief Replace characters with multiple characters.</a>
|
||
|
<a name="4846"><span class="lineNum"> 4846 </span> : : * @param __pos Index of first character to replace.</a>
|
||
|
<a name="4847"><span class="lineNum"> 4847 </span> : : * @param __n1 Number of characters to be replaced.</a>
|
||
|
<a name="4848"><span class="lineNum"> 4848 </span> : : * @param __n2 Number of characters to insert.</a>
|
||
|
<a name="4849"><span class="lineNum"> 4849 </span> : : * @param __c Character to insert.</a>
|
||
|
<a name="4850"><span class="lineNum"> 4850 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4851"><span class="lineNum"> 4851 </span> : : * @throw std::out_of_range If @a __pos > size().</a>
|
||
|
<a name="4852"><span class="lineNum"> 4852 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="4853"><span class="lineNum"> 4853 </span> : : *</a>
|
||
|
<a name="4854"><span class="lineNum"> 4854 </span> : : * Removes the characters in the range [pos,pos + n1) from this</a>
|
||
|
<a name="4855"><span class="lineNum"> 4855 </span> : : * string. In place, @a __n2 copies of @a __c are inserted.</a>
|
||
|
<a name="4856"><span class="lineNum"> 4856 </span> : : * If @a __pos is beyond end of string, out_of_range is thrown.</a>
|
||
|
<a name="4857"><span class="lineNum"> 4857 </span> : : * If the length of result exceeds max_size(), length_error is</a>
|
||
|
<a name="4858"><span class="lineNum"> 4858 </span> : : * thrown. The value of the string doesn't change if an error</a>
|
||
|
<a name="4859"><span class="lineNum"> 4859 </span> : : * is thrown.</a>
|
||
|
<a name="4860"><span class="lineNum"> 4860 </span> : : */</a>
|
||
|
<a name="4861"><span class="lineNum"> 4861 </span> : : basic_string&</a>
|
||
|
<a name="4862"><span class="lineNum"> 4862 </span> : : replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)</a>
|
||
|
<a name="4863"><span class="lineNum"> 4863 </span> : : { return _M_replace_aux(_M_check(__pos, "basic_string::replace"),</a>
|
||
|
<a name="4864"><span class="lineNum"> 4864 </span> : : _M_limit(__pos, __n1), __n2, __c); }</a>
|
||
|
<a name="4865"><span class="lineNum"> 4865 </span> : : </a>
|
||
|
<a name="4866"><span class="lineNum"> 4866 </span> : : /**</a>
|
||
|
<a name="4867"><span class="lineNum"> 4867 </span> : : * @brief Replace range of characters with string.</a>
|
||
|
<a name="4868"><span class="lineNum"> 4868 </span> : : * @param __i1 Iterator referencing start of range to replace.</a>
|
||
|
<a name="4869"><span class="lineNum"> 4869 </span> : : * @param __i2 Iterator referencing end of range to replace.</a>
|
||
|
<a name="4870"><span class="lineNum"> 4870 </span> : : * @param __str String value to insert.</a>
|
||
|
<a name="4871"><span class="lineNum"> 4871 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4872"><span class="lineNum"> 4872 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="4873"><span class="lineNum"> 4873 </span> : : *</a>
|
||
|
<a name="4874"><span class="lineNum"> 4874 </span> : : * Removes the characters in the range [__i1,__i2). In place,</a>
|
||
|
<a name="4875"><span class="lineNum"> 4875 </span> : : * the value of @a __str is inserted. If the length of result</a>
|
||
|
<a name="4876"><span class="lineNum"> 4876 </span> : : * exceeds max_size(), length_error is thrown. The value of</a>
|
||
|
<a name="4877"><span class="lineNum"> 4877 </span> : : * the string doesn't change if an error is thrown.</a>
|
||
|
<a name="4878"><span class="lineNum"> 4878 </span> : : */</a>
|
||
|
<a name="4879"><span class="lineNum"> 4879 </span> : : basic_string&</a>
|
||
|
<a name="4880"><span class="lineNum"> 4880 </span> : : replace(iterator __i1, iterator __i2, const basic_string& __str)</a>
|
||
|
<a name="4881"><span class="lineNum"> 4881 </span> : : { return this->replace(__i1, __i2, __str._M_data(), __str.size()); }</a>
|
||
|
<a name="4882"><span class="lineNum"> 4882 </span> : : </a>
|
||
|
<a name="4883"><span class="lineNum"> 4883 </span> : : /**</a>
|
||
|
<a name="4884"><span class="lineNum"> 4884 </span> : : * @brief Replace range of characters with C substring.</a>
|
||
|
<a name="4885"><span class="lineNum"> 4885 </span> : : * @param __i1 Iterator referencing start of range to replace.</a>
|
||
|
<a name="4886"><span class="lineNum"> 4886 </span> : : * @param __i2 Iterator referencing end of range to replace.</a>
|
||
|
<a name="4887"><span class="lineNum"> 4887 </span> : : * @param __s C string value to insert.</a>
|
||
|
<a name="4888"><span class="lineNum"> 4888 </span> : : * @param __n Number of characters from s to insert.</a>
|
||
|
<a name="4889"><span class="lineNum"> 4889 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4890"><span class="lineNum"> 4890 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="4891"><span class="lineNum"> 4891 </span> : : *</a>
|
||
|
<a name="4892"><span class="lineNum"> 4892 </span> : : * Removes the characters in the range [__i1,__i2). In place,</a>
|
||
|
<a name="4893"><span class="lineNum"> 4893 </span> : : * the first @a __n characters of @a __s are inserted. If the</a>
|
||
|
<a name="4894"><span class="lineNum"> 4894 </span> : : * length of result exceeds max_size(), length_error is thrown.</a>
|
||
|
<a name="4895"><span class="lineNum"> 4895 </span> : : * The value of the string doesn't change if an error is</a>
|
||
|
<a name="4896"><span class="lineNum"> 4896 </span> : : * thrown.</a>
|
||
|
<a name="4897"><span class="lineNum"> 4897 </span> : : */</a>
|
||
|
<a name="4898"><span class="lineNum"> 4898 </span> : : basic_string&</a>
|
||
|
<a name="4899"><span class="lineNum"> 4899 </span> : : replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n)</a>
|
||
|
<a name="4900"><span class="lineNum"> 4900 </span> : : {</a>
|
||
|
<a name="4901"><span class="lineNum"> 4901 </span> : : _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2</a>
|
||
|
<a name="4902"><span class="lineNum"> 4902 </span> : : && __i2 <= _M_iend());</a>
|
||
|
<a name="4903"><span class="lineNum"> 4903 </span> : : return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n);</a>
|
||
|
<a name="4904"><span class="lineNum"> 4904 </span> : : }</a>
|
||
|
<a name="4905"><span class="lineNum"> 4905 </span> : : </a>
|
||
|
<a name="4906"><span class="lineNum"> 4906 </span> : : /**</a>
|
||
|
<a name="4907"><span class="lineNum"> 4907 </span> : : * @brief Replace range of characters with C string.</a>
|
||
|
<a name="4908"><span class="lineNum"> 4908 </span> : : * @param __i1 Iterator referencing start of range to replace.</a>
|
||
|
<a name="4909"><span class="lineNum"> 4909 </span> : : * @param __i2 Iterator referencing end of range to replace.</a>
|
||
|
<a name="4910"><span class="lineNum"> 4910 </span> : : * @param __s C string value to insert.</a>
|
||
|
<a name="4911"><span class="lineNum"> 4911 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4912"><span class="lineNum"> 4912 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="4913"><span class="lineNum"> 4913 </span> : : *</a>
|
||
|
<a name="4914"><span class="lineNum"> 4914 </span> : : * Removes the characters in the range [__i1,__i2). In place,</a>
|
||
|
<a name="4915"><span class="lineNum"> 4915 </span> : : * the characters of @a __s are inserted. If the length of</a>
|
||
|
<a name="4916"><span class="lineNum"> 4916 </span> : : * result exceeds max_size(), length_error is thrown. The</a>
|
||
|
<a name="4917"><span class="lineNum"> 4917 </span> : : * value of the string doesn't change if an error is thrown.</a>
|
||
|
<a name="4918"><span class="lineNum"> 4918 </span> : : */</a>
|
||
|
<a name="4919"><span class="lineNum"> 4919 </span> : : basic_string&</a>
|
||
|
<a name="4920"><span class="lineNum"> 4920 </span> : : replace(iterator __i1, iterator __i2, const _CharT* __s)</a>
|
||
|
<a name="4921"><span class="lineNum"> 4921 </span> : : {</a>
|
||
|
<a name="4922"><span class="lineNum"> 4922 </span> : : __glibcxx_requires_string(__s);</a>
|
||
|
<a name="4923"><span class="lineNum"> 4923 </span> : : return this->replace(__i1, __i2, __s, traits_type::length(__s));</a>
|
||
|
<a name="4924"><span class="lineNum"> 4924 </span> : : }</a>
|
||
|
<a name="4925"><span class="lineNum"> 4925 </span> : : </a>
|
||
|
<a name="4926"><span class="lineNum"> 4926 </span> : : /**</a>
|
||
|
<a name="4927"><span class="lineNum"> 4927 </span> : : * @brief Replace range of characters with multiple characters</a>
|
||
|
<a name="4928"><span class="lineNum"> 4928 </span> : : * @param __i1 Iterator referencing start of range to replace.</a>
|
||
|
<a name="4929"><span class="lineNum"> 4929 </span> : : * @param __i2 Iterator referencing end of range to replace.</a>
|
||
|
<a name="4930"><span class="lineNum"> 4930 </span> : : * @param __n Number of characters to insert.</a>
|
||
|
<a name="4931"><span class="lineNum"> 4931 </span> : : * @param __c Character to insert.</a>
|
||
|
<a name="4932"><span class="lineNum"> 4932 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4933"><span class="lineNum"> 4933 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="4934"><span class="lineNum"> 4934 </span> : : *</a>
|
||
|
<a name="4935"><span class="lineNum"> 4935 </span> : : * Removes the characters in the range [__i1,__i2). In place,</a>
|
||
|
<a name="4936"><span class="lineNum"> 4936 </span> : : * @a __n copies of @a __c are inserted. If the length of</a>
|
||
|
<a name="4937"><span class="lineNum"> 4937 </span> : : * result exceeds max_size(), length_error is thrown. The</a>
|
||
|
<a name="4938"><span class="lineNum"> 4938 </span> : : * value of the string doesn't change if an error is thrown.</a>
|
||
|
<a name="4939"><span class="lineNum"> 4939 </span> : : */</a>
|
||
|
<a name="4940"><span class="lineNum"> 4940 </span> : : basic_string&</a>
|
||
|
<a name="4941"><span class="lineNum"> 4941 </span> : : replace(iterator __i1, iterator __i2, size_type __n, _CharT __c)</a>
|
||
|
<a name="4942"><span class="lineNum"> 4942 </span> : : {</a>
|
||
|
<a name="4943"><span class="lineNum"> 4943 </span> : : _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2</a>
|
||
|
<a name="4944"><span class="lineNum"> 4944 </span> : : && __i2 <= _M_iend());</a>
|
||
|
<a name="4945"><span class="lineNum"> 4945 </span> : : return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c);</a>
|
||
|
<a name="4946"><span class="lineNum"> 4946 </span> : : }</a>
|
||
|
<a name="4947"><span class="lineNum"> 4947 </span> : : </a>
|
||
|
<a name="4948"><span class="lineNum"> 4948 </span> : : /**</a>
|
||
|
<a name="4949"><span class="lineNum"> 4949 </span> : : * @brief Replace range of characters with range.</a>
|
||
|
<a name="4950"><span class="lineNum"> 4950 </span> : : * @param __i1 Iterator referencing start of range to replace.</a>
|
||
|
<a name="4951"><span class="lineNum"> 4951 </span> : : * @param __i2 Iterator referencing end of range to replace.</a>
|
||
|
<a name="4952"><span class="lineNum"> 4952 </span> : : * @param __k1 Iterator referencing start of range to insert.</a>
|
||
|
<a name="4953"><span class="lineNum"> 4953 </span> : : * @param __k2 Iterator referencing end of range to insert.</a>
|
||
|
<a name="4954"><span class="lineNum"> 4954 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="4955"><span class="lineNum"> 4955 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="4956"><span class="lineNum"> 4956 </span> : : *</a>
|
||
|
<a name="4957"><span class="lineNum"> 4957 </span> : : * Removes the characters in the range [__i1,__i2). In place,</a>
|
||
|
<a name="4958"><span class="lineNum"> 4958 </span> : : * characters in the range [__k1,__k2) are inserted. If the</a>
|
||
|
<a name="4959"><span class="lineNum"> 4959 </span> : : * length of result exceeds max_size(), length_error is thrown.</a>
|
||
|
<a name="4960"><span class="lineNum"> 4960 </span> : : * The value of the string doesn't change if an error is</a>
|
||
|
<a name="4961"><span class="lineNum"> 4961 </span> : : * thrown.</a>
|
||
|
<a name="4962"><span class="lineNum"> 4962 </span> : : */</a>
|
||
|
<a name="4963"><span class="lineNum"> 4963 </span> : : template<class _InputIterator></a>
|
||
|
<a name="4964"><span class="lineNum"> 4964 </span> : : basic_string&</a>
|
||
|
<a name="4965"><span class="lineNum"> 4965 </span> : : replace(iterator __i1, iterator __i2,</a>
|
||
|
<a name="4966"><span class="lineNum"> 4966 </span> : : _InputIterator __k1, _InputIterator __k2)</a>
|
||
|
<a name="4967"><span class="lineNum"> 4967 </span> : : {</a>
|
||
|
<a name="4968"><span class="lineNum"> 4968 </span> : : _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2</a>
|
||
|
<a name="4969"><span class="lineNum"> 4969 </span> : : && __i2 <= _M_iend());</a>
|
||
|
<a name="4970"><span class="lineNum"> 4970 </span> : : __glibcxx_requires_valid_range(__k1, __k2);</a>
|
||
|
<a name="4971"><span class="lineNum"> 4971 </span> : : typedef typename std::__is_integer<_InputIterator>::__type _Integral;</a>
|
||
|
<a name="4972"><span class="lineNum"> 4972 </span> : : return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral());</a>
|
||
|
<a name="4973"><span class="lineNum"> 4973 </span> : : }</a>
|
||
|
<a name="4974"><span class="lineNum"> 4974 </span> : : </a>
|
||
|
<a name="4975"><span class="lineNum"> 4975 </span> : : // Specializations for the common case of pointer and iterator:</a>
|
||
|
<a name="4976"><span class="lineNum"> 4976 </span> : : // useful to avoid the overhead of temporary buffering in _M_replace.</a>
|
||
|
<a name="4977"><span class="lineNum"> 4977 </span> : : basic_string&</a>
|
||
|
<a name="4978"><span class="lineNum"> 4978 </span> : : replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2)</a>
|
||
|
<a name="4979"><span class="lineNum"> 4979 </span> : : {</a>
|
||
|
<a name="4980"><span class="lineNum"> 4980 </span> : : _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2</a>
|
||
|
<a name="4981"><span class="lineNum"> 4981 </span> : : && __i2 <= _M_iend());</a>
|
||
|
<a name="4982"><span class="lineNum"> 4982 </span> : : __glibcxx_requires_valid_range(__k1, __k2);</a>
|
||
|
<a name="4983"><span class="lineNum"> 4983 </span> : : return this->replace(__i1 - _M_ibegin(), __i2 - __i1,</a>
|
||
|
<a name="4984"><span class="lineNum"> 4984 </span> : : __k1, __k2 - __k1);</a>
|
||
|
<a name="4985"><span class="lineNum"> 4985 </span> : : }</a>
|
||
|
<a name="4986"><span class="lineNum"> 4986 </span> : : </a>
|
||
|
<a name="4987"><span class="lineNum"> 4987 </span> : : basic_string&</a>
|
||
|
<a name="4988"><span class="lineNum"> 4988 </span> : : replace(iterator __i1, iterator __i2,</a>
|
||
|
<a name="4989"><span class="lineNum"> 4989 </span> : : const _CharT* __k1, const _CharT* __k2)</a>
|
||
|
<a name="4990"><span class="lineNum"> 4990 </span> : : {</a>
|
||
|
<a name="4991"><span class="lineNum"> 4991 </span> : : _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2</a>
|
||
|
<a name="4992"><span class="lineNum"> 4992 </span> : : && __i2 <= _M_iend());</a>
|
||
|
<a name="4993"><span class="lineNum"> 4993 </span> : : __glibcxx_requires_valid_range(__k1, __k2);</a>
|
||
|
<a name="4994"><span class="lineNum"> 4994 </span> : : return this->replace(__i1 - _M_ibegin(), __i2 - __i1,</a>
|
||
|
<a name="4995"><span class="lineNum"> 4995 </span> : : __k1, __k2 - __k1);</a>
|
||
|
<a name="4996"><span class="lineNum"> 4996 </span> : : }</a>
|
||
|
<a name="4997"><span class="lineNum"> 4997 </span> : : </a>
|
||
|
<a name="4998"><span class="lineNum"> 4998 </span> : : basic_string&</a>
|
||
|
<a name="4999"><span class="lineNum"> 4999 </span> : : replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2)</a>
|
||
|
<a name="5000"><span class="lineNum"> 5000 </span> : : {</a>
|
||
|
<a name="5001"><span class="lineNum"> 5001 </span> : : _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2</a>
|
||
|
<a name="5002"><span class="lineNum"> 5002 </span> : : && __i2 <= _M_iend());</a>
|
||
|
<a name="5003"><span class="lineNum"> 5003 </span> : : __glibcxx_requires_valid_range(__k1, __k2);</a>
|
||
|
<a name="5004"><span class="lineNum"> 5004 </span> : : return this->replace(__i1 - _M_ibegin(), __i2 - __i1,</a>
|
||
|
<a name="5005"><span class="lineNum"> 5005 </span> : : __k1.base(), __k2 - __k1);</a>
|
||
|
<a name="5006"><span class="lineNum"> 5006 </span> : : }</a>
|
||
|
<a name="5007"><span class="lineNum"> 5007 </span> : : </a>
|
||
|
<a name="5008"><span class="lineNum"> 5008 </span> : : basic_string&</a>
|
||
|
<a name="5009"><span class="lineNum"> 5009 </span> : : replace(iterator __i1, iterator __i2,</a>
|
||
|
<a name="5010"><span class="lineNum"> 5010 </span> : : const_iterator __k1, const_iterator __k2)</a>
|
||
|
<a name="5011"><span class="lineNum"> 5011 </span> : : {</a>
|
||
|
<a name="5012"><span class="lineNum"> 5012 </span> : : _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2</a>
|
||
|
<a name="5013"><span class="lineNum"> 5013 </span> : : && __i2 <= _M_iend());</a>
|
||
|
<a name="5014"><span class="lineNum"> 5014 </span> : : __glibcxx_requires_valid_range(__k1, __k2);</a>
|
||
|
<a name="5015"><span class="lineNum"> 5015 </span> : : return this->replace(__i1 - _M_ibegin(), __i2 - __i1,</a>
|
||
|
<a name="5016"><span class="lineNum"> 5016 </span> : : __k1.base(), __k2 - __k1);</a>
|
||
|
<a name="5017"><span class="lineNum"> 5017 </span> : : }</a>
|
||
|
<a name="5018"><span class="lineNum"> 5018 </span> : : </a>
|
||
|
<a name="5019"><span class="lineNum"> 5019 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="5020"><span class="lineNum"> 5020 </span> : : /**</a>
|
||
|
<a name="5021"><span class="lineNum"> 5021 </span> : : * @brief Replace range of characters with initializer_list.</a>
|
||
|
<a name="5022"><span class="lineNum"> 5022 </span> : : * @param __i1 Iterator referencing start of range to replace.</a>
|
||
|
<a name="5023"><span class="lineNum"> 5023 </span> : : * @param __i2 Iterator referencing end of range to replace.</a>
|
||
|
<a name="5024"><span class="lineNum"> 5024 </span> : : * @param __l The initializer_list of characters to insert.</a>
|
||
|
<a name="5025"><span class="lineNum"> 5025 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="5026"><span class="lineNum"> 5026 </span> : : * @throw std::length_error If new length exceeds @c max_size().</a>
|
||
|
<a name="5027"><span class="lineNum"> 5027 </span> : : *</a>
|
||
|
<a name="5028"><span class="lineNum"> 5028 </span> : : * Removes the characters in the range [__i1,__i2). In place,</a>
|
||
|
<a name="5029"><span class="lineNum"> 5029 </span> : : * characters in the range [__k1,__k2) are inserted. If the</a>
|
||
|
<a name="5030"><span class="lineNum"> 5030 </span> : : * length of result exceeds max_size(), length_error is thrown.</a>
|
||
|
<a name="5031"><span class="lineNum"> 5031 </span> : : * The value of the string doesn't change if an error is</a>
|
||
|
<a name="5032"><span class="lineNum"> 5032 </span> : : * thrown.</a>
|
||
|
<a name="5033"><span class="lineNum"> 5033 </span> : : */</a>
|
||
|
<a name="5034"><span class="lineNum"> 5034 </span> : : basic_string& replace(iterator __i1, iterator __i2,</a>
|
||
|
<a name="5035"><span class="lineNum"> 5035 </span> : : initializer_list<_CharT> __l)</a>
|
||
|
<a name="5036"><span class="lineNum"> 5036 </span> : : { return this->replace(__i1, __i2, __l.begin(), __l.end()); }</a>
|
||
|
<a name="5037"><span class="lineNum"> 5037 </span> : : #endif // C++11</a>
|
||
|
<a name="5038"><span class="lineNum"> 5038 </span> : : </a>
|
||
|
<a name="5039"><span class="lineNum"> 5039 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="5040"><span class="lineNum"> 5040 </span> : : /**</a>
|
||
|
<a name="5041"><span class="lineNum"> 5041 </span> : : * @brief Replace range of characters with string_view.</a>
|
||
|
<a name="5042"><span class="lineNum"> 5042 </span> : : * @param __pos The position to replace at.</a>
|
||
|
<a name="5043"><span class="lineNum"> 5043 </span> : : * @param __n The number of characters to replace.</a>
|
||
|
<a name="5044"><span class="lineNum"> 5044 </span> : : * @param __svt The object convertible to string_view to insert.</a>
|
||
|
<a name="5045"><span class="lineNum"> 5045 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="5046"><span class="lineNum"> 5046 </span> : : */</a>
|
||
|
<a name="5047"><span class="lineNum"> 5047 </span> : : template<typename _Tp></a>
|
||
|
<a name="5048"><span class="lineNum"> 5048 </span> : : _If_sv<_Tp, basic_string&></a>
|
||
|
<a name="5049"><span class="lineNum"> 5049 </span> : : replace(size_type __pos, size_type __n, const _Tp& __svt)</a>
|
||
|
<a name="5050"><span class="lineNum"> 5050 </span> : : {</a>
|
||
|
<a name="5051"><span class="lineNum"> 5051 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="5052"><span class="lineNum"> 5052 </span> : : return this->replace(__pos, __n, __sv.data(), __sv.size());</a>
|
||
|
<a name="5053"><span class="lineNum"> 5053 </span> : : }</a>
|
||
|
<a name="5054"><span class="lineNum"> 5054 </span> : : </a>
|
||
|
<a name="5055"><span class="lineNum"> 5055 </span> : : /**</a>
|
||
|
<a name="5056"><span class="lineNum"> 5056 </span> : : * @brief Replace range of characters with string_view.</a>
|
||
|
<a name="5057"><span class="lineNum"> 5057 </span> : : * @param __pos1 The position to replace at.</a>
|
||
|
<a name="5058"><span class="lineNum"> 5058 </span> : : * @param __n1 The number of characters to replace.</a>
|
||
|
<a name="5059"><span class="lineNum"> 5059 </span> : : * @param __svt The object convertible to string_view to insert from.</a>
|
||
|
<a name="5060"><span class="lineNum"> 5060 </span> : : * @param __pos2 The position in the string_view to insert from.</a>
|
||
|
<a name="5061"><span class="lineNum"> 5061 </span> : : * @param __n2 The number of characters to insert.</a>
|
||
|
<a name="5062"><span class="lineNum"> 5062 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="5063"><span class="lineNum"> 5063 </span> : : */</a>
|
||
|
<a name="5064"><span class="lineNum"> 5064 </span> : : template<typename _Tp></a>
|
||
|
<a name="5065"><span class="lineNum"> 5065 </span> : : _If_sv<_Tp, basic_string&></a>
|
||
|
<a name="5066"><span class="lineNum"> 5066 </span> : : replace(size_type __pos1, size_type __n1, const _Tp& __svt,</a>
|
||
|
<a name="5067"><span class="lineNum"> 5067 </span> : : size_type __pos2, size_type __n2 = npos)</a>
|
||
|
<a name="5068"><span class="lineNum"> 5068 </span> : : {</a>
|
||
|
<a name="5069"><span class="lineNum"> 5069 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="5070"><span class="lineNum"> 5070 </span> : : return this->replace(__pos1, __n1,</a>
|
||
|
<a name="5071"><span class="lineNum"> 5071 </span> : : __sv.data()</a>
|
||
|
<a name="5072"><span class="lineNum"> 5072 </span> : : + std::__sv_check(__sv.size(), __pos2, "basic_string::replace"),</a>
|
||
|
<a name="5073"><span class="lineNum"> 5073 </span> : : std::__sv_limit(__sv.size(), __pos2, __n2));</a>
|
||
|
<a name="5074"><span class="lineNum"> 5074 </span> : : }</a>
|
||
|
<a name="5075"><span class="lineNum"> 5075 </span> : : </a>
|
||
|
<a name="5076"><span class="lineNum"> 5076 </span> : : /**</a>
|
||
|
<a name="5077"><span class="lineNum"> 5077 </span> : : * @brief Replace range of characters with string_view.</a>
|
||
|
<a name="5078"><span class="lineNum"> 5078 </span> : : * @param __i1 An iterator referencing the start position</a>
|
||
|
<a name="5079"><span class="lineNum"> 5079 </span> : : to replace at.</a>
|
||
|
<a name="5080"><span class="lineNum"> 5080 </span> : : * @param __i2 An iterator referencing the end position</a>
|
||
|
<a name="5081"><span class="lineNum"> 5081 </span> : : for the replace.</a>
|
||
|
<a name="5082"><span class="lineNum"> 5082 </span> : : * @param __svt The object convertible to string_view to insert from.</a>
|
||
|
<a name="5083"><span class="lineNum"> 5083 </span> : : * @return Reference to this string.</a>
|
||
|
<a name="5084"><span class="lineNum"> 5084 </span> : : */</a>
|
||
|
<a name="5085"><span class="lineNum"> 5085 </span> : : template<typename _Tp></a>
|
||
|
<a name="5086"><span class="lineNum"> 5086 </span> : : _If_sv<_Tp, basic_string&></a>
|
||
|
<a name="5087"><span class="lineNum"> 5087 </span> : : replace(const_iterator __i1, const_iterator __i2, const _Tp& __svt)</a>
|
||
|
<a name="5088"><span class="lineNum"> 5088 </span> : : {</a>
|
||
|
<a name="5089"><span class="lineNum"> 5089 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="5090"><span class="lineNum"> 5090 </span> : : return this->replace(__i1 - begin(), __i2 - __i1, __sv);</a>
|
||
|
<a name="5091"><span class="lineNum"> 5091 </span> : : }</a>
|
||
|
<a name="5092"><span class="lineNum"> 5092 </span> : : #endif // C++17</a>
|
||
|
<a name="5093"><span class="lineNum"> 5093 </span> : : </a>
|
||
|
<a name="5094"><span class="lineNum"> 5094 </span> : : private:</a>
|
||
|
<a name="5095"><span class="lineNum"> 5095 </span> : : template<class _Integer></a>
|
||
|
<a name="5096"><span class="lineNum"> 5096 </span> : : basic_string&</a>
|
||
|
<a name="5097"><span class="lineNum"> 5097 </span> : : _M_replace_dispatch(iterator __i1, iterator __i2, _Integer __n,</a>
|
||
|
<a name="5098"><span class="lineNum"> 5098 </span> : : _Integer __val, __true_type)</a>
|
||
|
<a name="5099"><span class="lineNum"> 5099 </span> : : { return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); }</a>
|
||
|
<a name="5100"><span class="lineNum"> 5100 </span> : : </a>
|
||
|
<a name="5101"><span class="lineNum"> 5101 </span> : : template<class _InputIterator></a>
|
||
|
<a name="5102"><span class="lineNum"> 5102 </span> : : basic_string&</a>
|
||
|
<a name="5103"><span class="lineNum"> 5103 </span> : : _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1,</a>
|
||
|
<a name="5104"><span class="lineNum"> 5104 </span> : : _InputIterator __k2, __false_type);</a>
|
||
|
<a name="5105"><span class="lineNum"> 5105 </span> : : </a>
|
||
|
<a name="5106"><span class="lineNum"> 5106 </span> : : basic_string&</a>
|
||
|
<a name="5107"><span class="lineNum"> 5107 </span> : : _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2,</a>
|
||
|
<a name="5108"><span class="lineNum"> 5108 </span> : : _CharT __c);</a>
|
||
|
<a name="5109"><span class="lineNum"> 5109 </span> : : </a>
|
||
|
<a name="5110"><span class="lineNum"> 5110 </span> : : basic_string&</a>
|
||
|
<a name="5111"><span class="lineNum"> 5111 </span> : : _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s,</a>
|
||
|
<a name="5112"><span class="lineNum"> 5112 </span> : : size_type __n2);</a>
|
||
|
<a name="5113"><span class="lineNum"> 5113 </span> : : </a>
|
||
|
<a name="5114"><span class="lineNum"> 5114 </span> : : // _S_construct_aux is used to implement the 21.3.1 para 15 which</a>
|
||
|
<a name="5115"><span class="lineNum"> 5115 </span> : : // requires special behaviour if _InIter is an integral type</a>
|
||
|
<a name="5116"><span class="lineNum"> 5116 </span> : : template<class _InIterator></a>
|
||
|
<a name="5117"><span class="lineNum"> 5117 </span> : : static _CharT*</a>
|
||
|
<a name="5118"><span class="lineNum"> 5118 </span> : : _S_construct_aux(_InIterator __beg, _InIterator __end,</a>
|
||
|
<a name="5119"><span class="lineNum"> 5119 </span> : : const _Alloc& __a, __false_type)</a>
|
||
|
<a name="5120"><span class="lineNum"> 5120 </span> : : {</a>
|
||
|
<a name="5121"><span class="lineNum"> 5121 </span> : : typedef typename iterator_traits<_InIterator>::iterator_category _Tag;</a>
|
||
|
<a name="5122"><span class="lineNum"> 5122 </span> : : return _S_construct(__beg, __end, __a, _Tag());</a>
|
||
|
<a name="5123"><span class="lineNum"> 5123 </span> : : }</a>
|
||
|
<a name="5124"><span class="lineNum"> 5124 </span> : : </a>
|
||
|
<a name="5125"><span class="lineNum"> 5125 </span> : : // _GLIBCXX_RESOLVE_LIB_DEFECTS</a>
|
||
|
<a name="5126"><span class="lineNum"> 5126 </span> : : // 438. Ambiguity in the "do the right thing" clause</a>
|
||
|
<a name="5127"><span class="lineNum"> 5127 </span> : : template<class _Integer></a>
|
||
|
<a name="5128"><span class="lineNum"> 5128 </span> : : static _CharT*</a>
|
||
|
<a name="5129"><span class="lineNum"> 5129 </span> : : _S_construct_aux(_Integer __beg, _Integer __end,</a>
|
||
|
<a name="5130"><span class="lineNum"> 5130 </span> : : const _Alloc& __a, __true_type)</a>
|
||
|
<a name="5131"><span class="lineNum"> 5131 </span> : : { return _S_construct_aux_2(static_cast<size_type>(__beg),</a>
|
||
|
<a name="5132"><span class="lineNum"> 5132 </span> : : __end, __a); }</a>
|
||
|
<a name="5133"><span class="lineNum"> 5133 </span> : : </a>
|
||
|
<a name="5134"><span class="lineNum"> 5134 </span> : : static _CharT*</a>
|
||
|
<a name="5135"><span class="lineNum"> 5135 </span> : : _S_construct_aux_2(size_type __req, _CharT __c, const _Alloc& __a)</a>
|
||
|
<a name="5136"><span class="lineNum"> 5136 </span> : : { return _S_construct(__req, __c, __a); }</a>
|
||
|
<a name="5137"><span class="lineNum"> 5137 </span> : : </a>
|
||
|
<a name="5138"><span class="lineNum"> 5138 </span> : : template<class _InIterator></a>
|
||
|
<a name="5139"><span class="lineNum"> 5139 </span> : : static _CharT*</a>
|
||
|
<a name="5140"><span class="lineNum"> 5140 </span> : : _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a)</a>
|
||
|
<a name="5141"><span class="lineNum"> 5141 </span> : : {</a>
|
||
|
<a name="5142"><span class="lineNum"> 5142 </span> : : typedef typename std::__is_integer<_InIterator>::__type _Integral;</a>
|
||
|
<a name="5143"><span class="lineNum"> 5143 </span> : : return _S_construct_aux(__beg, __end, __a, _Integral());</a>
|
||
|
<a name="5144"><span class="lineNum"> 5144 </span> : : }</a>
|
||
|
<a name="5145"><span class="lineNum"> 5145 </span> : : </a>
|
||
|
<a name="5146"><span class="lineNum"> 5146 </span> : : // For Input Iterators, used in istreambuf_iterators, etc.</a>
|
||
|
<a name="5147"><span class="lineNum"> 5147 </span> : : template<class _InIterator></a>
|
||
|
<a name="5148"><span class="lineNum"> 5148 </span> : : static _CharT*</a>
|
||
|
<a name="5149"><span class="lineNum"> 5149 </span> : : _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,</a>
|
||
|
<a name="5150"><span class="lineNum"> 5150 </span> : : input_iterator_tag);</a>
|
||
|
<a name="5151"><span class="lineNum"> 5151 </span> : : </a>
|
||
|
<a name="5152"><span class="lineNum"> 5152 </span> : : // For forward_iterators up to random_access_iterators, used for</a>
|
||
|
<a name="5153"><span class="lineNum"> 5153 </span> : : // string::iterator, _CharT*, etc.</a>
|
||
|
<a name="5154"><span class="lineNum"> 5154 </span> : : template<class _FwdIterator></a>
|
||
|
<a name="5155"><span class="lineNum"> 5155 </span> : : static _CharT*</a>
|
||
|
<a name="5156"><span class="lineNum"> 5156 </span> : : _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a,</a>
|
||
|
<a name="5157"><span class="lineNum"> 5157 </span> : : forward_iterator_tag);</a>
|
||
|
<a name="5158"><span class="lineNum"> 5158 </span> : : </a>
|
||
|
<a name="5159"><span class="lineNum"> 5159 </span> : : static _CharT*</a>
|
||
|
<a name="5160"><span class="lineNum"> 5160 </span> : : _S_construct(size_type __req, _CharT __c, const _Alloc& __a);</a>
|
||
|
<a name="5161"><span class="lineNum"> 5161 </span> : : </a>
|
||
|
<a name="5162"><span class="lineNum"> 5162 </span> : : public:</a>
|
||
|
<a name="5163"><span class="lineNum"> 5163 </span> : : </a>
|
||
|
<a name="5164"><span class="lineNum"> 5164 </span> : : /**</a>
|
||
|
<a name="5165"><span class="lineNum"> 5165 </span> : : * @brief Copy substring into C string.</a>
|
||
|
<a name="5166"><span class="lineNum"> 5166 </span> : : * @param __s C string to copy value into.</a>
|
||
|
<a name="5167"><span class="lineNum"> 5167 </span> : : * @param __n Number of characters to copy.</a>
|
||
|
<a name="5168"><span class="lineNum"> 5168 </span> : : * @param __pos Index of first character to copy.</a>
|
||
|
<a name="5169"><span class="lineNum"> 5169 </span> : : * @return Number of characters actually copied</a>
|
||
|
<a name="5170"><span class="lineNum"> 5170 </span> : : * @throw std::out_of_range If __pos > size().</a>
|
||
|
<a name="5171"><span class="lineNum"> 5171 </span> : : *</a>
|
||
|
<a name="5172"><span class="lineNum"> 5172 </span> : : * Copies up to @a __n characters starting at @a __pos into the</a>
|
||
|
<a name="5173"><span class="lineNum"> 5173 </span> : : * C string @a __s. If @a __pos is %greater than size(),</a>
|
||
|
<a name="5174"><span class="lineNum"> 5174 </span> : : * out_of_range is thrown.</a>
|
||
|
<a name="5175"><span class="lineNum"> 5175 </span> : : */</a>
|
||
|
<a name="5176"><span class="lineNum"> 5176 </span> : : size_type</a>
|
||
|
<a name="5177"><span class="lineNum"> 5177 </span> : : copy(_CharT* __s, size_type __n, size_type __pos = 0) const;</a>
|
||
|
<a name="5178"><span class="lineNum"> 5178 </span> : : </a>
|
||
|
<a name="5179"><span class="lineNum"> 5179 </span> : : /**</a>
|
||
|
<a name="5180"><span class="lineNum"> 5180 </span> : : * @brief Swap contents with another string.</a>
|
||
|
<a name="5181"><span class="lineNum"> 5181 </span> : : * @param __s String to swap with.</a>
|
||
|
<a name="5182"><span class="lineNum"> 5182 </span> : : *</a>
|
||
|
<a name="5183"><span class="lineNum"> 5183 </span> : : * Exchanges the contents of this string with that of @a __s in constant</a>
|
||
|
<a name="5184"><span class="lineNum"> 5184 </span> : : * time.</a>
|
||
|
<a name="5185"><span class="lineNum"> 5185 </span> : : */</a>
|
||
|
<a name="5186"><span class="lineNum"> 5186 </span> : : void</a>
|
||
|
<a name="5187"><span class="lineNum"> 5187 </span> : : swap(basic_string& __s)</a>
|
||
|
<a name="5188"><span class="lineNum"> 5188 </span> : : _GLIBCXX_NOEXCEPT_IF(allocator_traits<_Alloc>::is_always_equal::value);</a>
|
||
|
<a name="5189"><span class="lineNum"> 5189 </span> : : </a>
|
||
|
<a name="5190"><span class="lineNum"> 5190 </span> : : // String operations:</a>
|
||
|
<a name="5191"><span class="lineNum"> 5191 </span> : : /**</a>
|
||
|
<a name="5192"><span class="lineNum"> 5192 </span> : : * @brief Return const pointer to null-terminated contents.</a>
|
||
|
<a name="5193"><span class="lineNum"> 5193 </span> : : *</a>
|
||
|
<a name="5194"><span class="lineNum"> 5194 </span> : : * This is a handle to internal data. Do not modify or dire things may</a>
|
||
|
<a name="5195"><span class="lineNum"> 5195 </span> : : * happen.</a>
|
||
|
<a name="5196"><span class="lineNum"> 5196 </span> : : */</a>
|
||
|
<a name="5197"><span class="lineNum"> 5197 </span> : : const _CharT*</a>
|
||
|
<a name="5198"><span class="lineNum"> 5198 </span> : : c_str() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="5199"><span class="lineNum"> 5199 </span> : : { return _M_data(); }</a>
|
||
|
<a name="5200"><span class="lineNum"> 5200 </span> : : </a>
|
||
|
<a name="5201"><span class="lineNum"> 5201 </span> : : /**</a>
|
||
|
<a name="5202"><span class="lineNum"> 5202 </span> : : * @brief Return const pointer to contents.</a>
|
||
|
<a name="5203"><span class="lineNum"> 5203 </span> : : *</a>
|
||
|
<a name="5204"><span class="lineNum"> 5204 </span> : : * This is a pointer to internal data. It is undefined to modify</a>
|
||
|
<a name="5205"><span class="lineNum"> 5205 </span> : : * the contents through the returned pointer. To get a pointer that</a>
|
||
|
<a name="5206"><span class="lineNum"> 5206 </span> : : * allows modifying the contents use @c &str[0] instead,</a>
|
||
|
<a name="5207"><span class="lineNum"> 5207 </span> : : * (or in C++17 the non-const @c str.data() overload).</a>
|
||
|
<a name="5208"><span class="lineNum"> 5208 </span> : : */</a>
|
||
|
<a name="5209"><span class="lineNum"> 5209 </span> : : const _CharT*</a>
|
||
|
<a name="5210"><span class="lineNum"> 5210 </span> : : data() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="5211"><span class="lineNum"> 5211 </span> : : { return _M_data(); }</a>
|
||
|
<a name="5212"><span class="lineNum"> 5212 </span> : : </a>
|
||
|
<a name="5213"><span class="lineNum"> 5213 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="5214"><span class="lineNum"> 5214 </span> : : /**</a>
|
||
|
<a name="5215"><span class="lineNum"> 5215 </span> : : * @brief Return non-const pointer to contents.</a>
|
||
|
<a name="5216"><span class="lineNum"> 5216 </span> : : *</a>
|
||
|
<a name="5217"><span class="lineNum"> 5217 </span> : : * This is a pointer to the character sequence held by the string.</a>
|
||
|
<a name="5218"><span class="lineNum"> 5218 </span> : : * Modifying the characters in the sequence is allowed.</a>
|
||
|
<a name="5219"><span class="lineNum"> 5219 </span> : : */</a>
|
||
|
<a name="5220"><span class="lineNum"> 5220 </span> : : _CharT*</a>
|
||
|
<a name="5221"><span class="lineNum"> 5221 </span> : : data() noexcept</a>
|
||
|
<a name="5222"><span class="lineNum"> 5222 </span> : : {</a>
|
||
|
<a name="5223"><span class="lineNum"> 5223 </span> : : _M_leak();</a>
|
||
|
<a name="5224"><span class="lineNum"> 5224 </span> : : return _M_data();</a>
|
||
|
<a name="5225"><span class="lineNum"> 5225 </span> : : }</a>
|
||
|
<a name="5226"><span class="lineNum"> 5226 </span> : : #endif</a>
|
||
|
<a name="5227"><span class="lineNum"> 5227 </span> : : </a>
|
||
|
<a name="5228"><span class="lineNum"> 5228 </span> : : /**</a>
|
||
|
<a name="5229"><span class="lineNum"> 5229 </span> : : * @brief Return copy of allocator used to construct this string.</a>
|
||
|
<a name="5230"><span class="lineNum"> 5230 </span> : : */</a>
|
||
|
<a name="5231"><span class="lineNum"> 5231 </span> : : allocator_type</a>
|
||
|
<a name="5232"><span class="lineNum"> 5232 </span> : : get_allocator() const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="5233"><span class="lineNum"> 5233 </span> : : { return _M_dataplus; }</a>
|
||
|
<a name="5234"><span class="lineNum"> 5234 </span> : : </a>
|
||
|
<a name="5235"><span class="lineNum"> 5235 </span> : : /**</a>
|
||
|
<a name="5236"><span class="lineNum"> 5236 </span> : : * @brief Find position of a C substring.</a>
|
||
|
<a name="5237"><span class="lineNum"> 5237 </span> : : * @param __s C string to locate.</a>
|
||
|
<a name="5238"><span class="lineNum"> 5238 </span> : : * @param __pos Index of character to search from.</a>
|
||
|
<a name="5239"><span class="lineNum"> 5239 </span> : : * @param __n Number of characters from @a s to search for.</a>
|
||
|
<a name="5240"><span class="lineNum"> 5240 </span> : : * @return Index of start of first occurrence.</a>
|
||
|
<a name="5241"><span class="lineNum"> 5241 </span> : : *</a>
|
||
|
<a name="5242"><span class="lineNum"> 5242 </span> : : * Starting from @a __pos, searches forward for the first @a</a>
|
||
|
<a name="5243"><span class="lineNum"> 5243 </span> : : * __n characters in @a __s within this string. If found,</a>
|
||
|
<a name="5244"><span class="lineNum"> 5244 </span> : : * returns the index where it begins. If not found, returns</a>
|
||
|
<a name="5245"><span class="lineNum"> 5245 </span> : : * npos.</a>
|
||
|
<a name="5246"><span class="lineNum"> 5246 </span> : : */</a>
|
||
|
<a name="5247"><span class="lineNum"> 5247 </span> : : size_type</a>
|
||
|
<a name="5248"><span class="lineNum"> 5248 </span> : : find(const _CharT* __s, size_type __pos, size_type __n) const</a>
|
||
|
<a name="5249"><span class="lineNum"> 5249 </span> : : _GLIBCXX_NOEXCEPT;</a>
|
||
|
<a name="5250"><span class="lineNum"> 5250 </span> : : </a>
|
||
|
<a name="5251"><span class="lineNum"> 5251 </span> : : /**</a>
|
||
|
<a name="5252"><span class="lineNum"> 5252 </span> : : * @brief Find position of a string.</a>
|
||
|
<a name="5253"><span class="lineNum"> 5253 </span> : : * @param __str String to locate.</a>
|
||
|
<a name="5254"><span class="lineNum"> 5254 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="5255"><span class="lineNum"> 5255 </span> : : * @return Index of start of first occurrence.</a>
|
||
|
<a name="5256"><span class="lineNum"> 5256 </span> : : *</a>
|
||
|
<a name="5257"><span class="lineNum"> 5257 </span> : : * Starting from @a __pos, searches forward for value of @a __str within</a>
|
||
|
<a name="5258"><span class="lineNum"> 5258 </span> : : * this string. If found, returns the index where it begins. If not</a>
|
||
|
<a name="5259"><span class="lineNum"> 5259 </span> : : * found, returns npos.</a>
|
||
|
<a name="5260"><span class="lineNum"> 5260 </span> : : */</a>
|
||
|
<a name="5261"><span class="lineNum"> 5261 </span> : : size_type</a>
|
||
|
<a name="5262"><span class="lineNum"> 5262 </span> : : find(const basic_string& __str, size_type __pos = 0) const</a>
|
||
|
<a name="5263"><span class="lineNum"> 5263 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="5264"><span class="lineNum"> 5264 </span> : : { return this->find(__str.data(), __pos, __str.size()); }</a>
|
||
|
<a name="5265"><span class="lineNum"> 5265 </span> : : </a>
|
||
|
<a name="5266"><span class="lineNum"> 5266 </span> : : /**</a>
|
||
|
<a name="5267"><span class="lineNum"> 5267 </span> : : * @brief Find position of a C string.</a>
|
||
|
<a name="5268"><span class="lineNum"> 5268 </span> : : * @param __s C string to locate.</a>
|
||
|
<a name="5269"><span class="lineNum"> 5269 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="5270"><span class="lineNum"> 5270 </span> : : * @return Index of start of first occurrence.</a>
|
||
|
<a name="5271"><span class="lineNum"> 5271 </span> : : *</a>
|
||
|
<a name="5272"><span class="lineNum"> 5272 </span> : : * Starting from @a __pos, searches forward for the value of @a</a>
|
||
|
<a name="5273"><span class="lineNum"> 5273 </span> : : * __s within this string. If found, returns the index where</a>
|
||
|
<a name="5274"><span class="lineNum"> 5274 </span> : : * it begins. If not found, returns npos.</a>
|
||
|
<a name="5275"><span class="lineNum"> 5275 </span> : : */</a>
|
||
|
<a name="5276"><span class="lineNum"> 5276 </span> : : size_type</a>
|
||
|
<a name="5277"><span class="lineNum"> 5277 </span> : : find(const _CharT* __s, size_type __pos = 0) const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="5278"><span class="lineNum"> 5278 </span> : : {</a>
|
||
|
<a name="5279"><span class="lineNum"> 5279 </span> : : __glibcxx_requires_string(__s);</a>
|
||
|
<a name="5280"><span class="lineNum"> 5280 </span> : : return this->find(__s, __pos, traits_type::length(__s));</a>
|
||
|
<a name="5281"><span class="lineNum"> 5281 </span> : : }</a>
|
||
|
<a name="5282"><span class="lineNum"> 5282 </span> : : </a>
|
||
|
<a name="5283"><span class="lineNum"> 5283 </span> : : /**</a>
|
||
|
<a name="5284"><span class="lineNum"> 5284 </span> : : * @brief Find position of a character.</a>
|
||
|
<a name="5285"><span class="lineNum"> 5285 </span> : : * @param __c Character to locate.</a>
|
||
|
<a name="5286"><span class="lineNum"> 5286 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="5287"><span class="lineNum"> 5287 </span> : : * @return Index of first occurrence.</a>
|
||
|
<a name="5288"><span class="lineNum"> 5288 </span> : : *</a>
|
||
|
<a name="5289"><span class="lineNum"> 5289 </span> : : * Starting from @a __pos, searches forward for @a __c within</a>
|
||
|
<a name="5290"><span class="lineNum"> 5290 </span> : : * this string. If found, returns the index where it was</a>
|
||
|
<a name="5291"><span class="lineNum"> 5291 </span> : : * found. If not found, returns npos.</a>
|
||
|
<a name="5292"><span class="lineNum"> 5292 </span> : : */</a>
|
||
|
<a name="5293"><span class="lineNum"> 5293 </span> : : size_type</a>
|
||
|
<a name="5294"><span class="lineNum"> 5294 </span> : : find(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT;</a>
|
||
|
<a name="5295"><span class="lineNum"> 5295 </span> : : </a>
|
||
|
<a name="5296"><span class="lineNum"> 5296 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="5297"><span class="lineNum"> 5297 </span> : : /**</a>
|
||
|
<a name="5298"><span class="lineNum"> 5298 </span> : : * @brief Find position of a string_view.</a>
|
||
|
<a name="5299"><span class="lineNum"> 5299 </span> : : * @param __svt The object convertible to string_view to locate.</a>
|
||
|
<a name="5300"><span class="lineNum"> 5300 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="5301"><span class="lineNum"> 5301 </span> : : * @return Index of start of first occurrence.</a>
|
||
|
<a name="5302"><span class="lineNum"> 5302 </span> : : */</a>
|
||
|
<a name="5303"><span class="lineNum"> 5303 </span> : : template<typename _Tp></a>
|
||
|
<a name="5304"><span class="lineNum"> 5304 </span> : : _If_sv<_Tp, size_type></a>
|
||
|
<a name="5305"><span class="lineNum"> 5305 </span> : : find(const _Tp& __svt, size_type __pos = 0) const</a>
|
||
|
<a name="5306"><span class="lineNum"> 5306 </span> : : noexcept(is_same<_Tp, __sv_type>::value)</a>
|
||
|
<a name="5307"><span class="lineNum"> 5307 </span> : : {</a>
|
||
|
<a name="5308"><span class="lineNum"> 5308 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="5309"><span class="lineNum"> 5309 </span> : : return this->find(__sv.data(), __pos, __sv.size());</a>
|
||
|
<a name="5310"><span class="lineNum"> 5310 </span> : : }</a>
|
||
|
<a name="5311"><span class="lineNum"> 5311 </span> : : #endif // C++17</a>
|
||
|
<a name="5312"><span class="lineNum"> 5312 </span> : : </a>
|
||
|
<a name="5313"><span class="lineNum"> 5313 </span> : : /**</a>
|
||
|
<a name="5314"><span class="lineNum"> 5314 </span> : : * @brief Find last position of a string.</a>
|
||
|
<a name="5315"><span class="lineNum"> 5315 </span> : : * @param __str String to locate.</a>
|
||
|
<a name="5316"><span class="lineNum"> 5316 </span> : : * @param __pos Index of character to search back from (default end).</a>
|
||
|
<a name="5317"><span class="lineNum"> 5317 </span> : : * @return Index of start of last occurrence.</a>
|
||
|
<a name="5318"><span class="lineNum"> 5318 </span> : : *</a>
|
||
|
<a name="5319"><span class="lineNum"> 5319 </span> : : * Starting from @a __pos, searches backward for value of @a</a>
|
||
|
<a name="5320"><span class="lineNum"> 5320 </span> : : * __str within this string. If found, returns the index where</a>
|
||
|
<a name="5321"><span class="lineNum"> 5321 </span> : : * it begins. If not found, returns npos.</a>
|
||
|
<a name="5322"><span class="lineNum"> 5322 </span> : : */</a>
|
||
|
<a name="5323"><span class="lineNum"> 5323 </span> : : size_type</a>
|
||
|
<a name="5324"><span class="lineNum"> 5324 </span> : : rfind(const basic_string& __str, size_type __pos = npos) const</a>
|
||
|
<a name="5325"><span class="lineNum"> 5325 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="5326"><span class="lineNum"> 5326 </span> : : { return this->rfind(__str.data(), __pos, __str.size()); }</a>
|
||
|
<a name="5327"><span class="lineNum"> 5327 </span> : : </a>
|
||
|
<a name="5328"><span class="lineNum"> 5328 </span> : : /**</a>
|
||
|
<a name="5329"><span class="lineNum"> 5329 </span> : : * @brief Find last position of a C substring.</a>
|
||
|
<a name="5330"><span class="lineNum"> 5330 </span> : : * @param __s C string to locate.</a>
|
||
|
<a name="5331"><span class="lineNum"> 5331 </span> : : * @param __pos Index of character to search back from.</a>
|
||
|
<a name="5332"><span class="lineNum"> 5332 </span> : : * @param __n Number of characters from s to search for.</a>
|
||
|
<a name="5333"><span class="lineNum"> 5333 </span> : : * @return Index of start of last occurrence.</a>
|
||
|
<a name="5334"><span class="lineNum"> 5334 </span> : : *</a>
|
||
|
<a name="5335"><span class="lineNum"> 5335 </span> : : * Starting from @a __pos, searches backward for the first @a</a>
|
||
|
<a name="5336"><span class="lineNum"> 5336 </span> : : * __n characters in @a __s within this string. If found,</a>
|
||
|
<a name="5337"><span class="lineNum"> 5337 </span> : : * returns the index where it begins. If not found, returns</a>
|
||
|
<a name="5338"><span class="lineNum"> 5338 </span> : : * npos.</a>
|
||
|
<a name="5339"><span class="lineNum"> 5339 </span> : : */</a>
|
||
|
<a name="5340"><span class="lineNum"> 5340 </span> : : size_type</a>
|
||
|
<a name="5341"><span class="lineNum"> 5341 </span> : : rfind(const _CharT* __s, size_type __pos, size_type __n) const</a>
|
||
|
<a name="5342"><span class="lineNum"> 5342 </span> : : _GLIBCXX_NOEXCEPT;</a>
|
||
|
<a name="5343"><span class="lineNum"> 5343 </span> : : </a>
|
||
|
<a name="5344"><span class="lineNum"> 5344 </span> : : /**</a>
|
||
|
<a name="5345"><span class="lineNum"> 5345 </span> : : * @brief Find last position of a C string.</a>
|
||
|
<a name="5346"><span class="lineNum"> 5346 </span> : : * @param __s C string to locate.</a>
|
||
|
<a name="5347"><span class="lineNum"> 5347 </span> : : * @param __pos Index of character to start search at (default end).</a>
|
||
|
<a name="5348"><span class="lineNum"> 5348 </span> : : * @return Index of start of last occurrence.</a>
|
||
|
<a name="5349"><span class="lineNum"> 5349 </span> : : *</a>
|
||
|
<a name="5350"><span class="lineNum"> 5350 </span> : : * Starting from @a __pos, searches backward for the value of</a>
|
||
|
<a name="5351"><span class="lineNum"> 5351 </span> : : * @a __s within this string. If found, returns the index</a>
|
||
|
<a name="5352"><span class="lineNum"> 5352 </span> : : * where it begins. If not found, returns npos.</a>
|
||
|
<a name="5353"><span class="lineNum"> 5353 </span> : : */</a>
|
||
|
<a name="5354"><span class="lineNum"> 5354 </span> : : size_type</a>
|
||
|
<a name="5355"><span class="lineNum"> 5355 </span> : : rfind(const _CharT* __s, size_type __pos = npos) const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="5356"><span class="lineNum"> 5356 </span> : : {</a>
|
||
|
<a name="5357"><span class="lineNum"> 5357 </span> : : __glibcxx_requires_string(__s);</a>
|
||
|
<a name="5358"><span class="lineNum"> 5358 </span> : : return this->rfind(__s, __pos, traits_type::length(__s));</a>
|
||
|
<a name="5359"><span class="lineNum"> 5359 </span> : : }</a>
|
||
|
<a name="5360"><span class="lineNum"> 5360 </span> : : </a>
|
||
|
<a name="5361"><span class="lineNum"> 5361 </span> : : /**</a>
|
||
|
<a name="5362"><span class="lineNum"> 5362 </span> : : * @brief Find last position of a character.</a>
|
||
|
<a name="5363"><span class="lineNum"> 5363 </span> : : * @param __c Character to locate.</a>
|
||
|
<a name="5364"><span class="lineNum"> 5364 </span> : : * @param __pos Index of character to search back from (default end).</a>
|
||
|
<a name="5365"><span class="lineNum"> 5365 </span> : : * @return Index of last occurrence.</a>
|
||
|
<a name="5366"><span class="lineNum"> 5366 </span> : : *</a>
|
||
|
<a name="5367"><span class="lineNum"> 5367 </span> : : * Starting from @a __pos, searches backward for @a __c within</a>
|
||
|
<a name="5368"><span class="lineNum"> 5368 </span> : : * this string. If found, returns the index where it was</a>
|
||
|
<a name="5369"><span class="lineNum"> 5369 </span> : : * found. If not found, returns npos.</a>
|
||
|
<a name="5370"><span class="lineNum"> 5370 </span> : : */</a>
|
||
|
<a name="5371"><span class="lineNum"> 5371 </span> : : size_type</a>
|
||
|
<a name="5372"><span class="lineNum"> 5372 </span> : : rfind(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT;</a>
|
||
|
<a name="5373"><span class="lineNum"> 5373 </span> : : </a>
|
||
|
<a name="5374"><span class="lineNum"> 5374 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="5375"><span class="lineNum"> 5375 </span> : : /**</a>
|
||
|
<a name="5376"><span class="lineNum"> 5376 </span> : : * @brief Find last position of a string_view.</a>
|
||
|
<a name="5377"><span class="lineNum"> 5377 </span> : : * @param __svt The object convertible to string_view to locate.</a>
|
||
|
<a name="5378"><span class="lineNum"> 5378 </span> : : * @param __pos Index of character to search back from (default end).</a>
|
||
|
<a name="5379"><span class="lineNum"> 5379 </span> : : * @return Index of start of last occurrence.</a>
|
||
|
<a name="5380"><span class="lineNum"> 5380 </span> : : */</a>
|
||
|
<a name="5381"><span class="lineNum"> 5381 </span> : : template<typename _Tp></a>
|
||
|
<a name="5382"><span class="lineNum"> 5382 </span> : : _If_sv<_Tp, size_type></a>
|
||
|
<a name="5383"><span class="lineNum"> 5383 </span> : : rfind(const _Tp& __svt, size_type __pos = npos) const</a>
|
||
|
<a name="5384"><span class="lineNum"> 5384 </span> : : noexcept(is_same<_Tp, __sv_type>::value)</a>
|
||
|
<a name="5385"><span class="lineNum"> 5385 </span> : : {</a>
|
||
|
<a name="5386"><span class="lineNum"> 5386 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="5387"><span class="lineNum"> 5387 </span> : : return this->rfind(__sv.data(), __pos, __sv.size());</a>
|
||
|
<a name="5388"><span class="lineNum"> 5388 </span> : : }</a>
|
||
|
<a name="5389"><span class="lineNum"> 5389 </span> : : #endif // C++17</a>
|
||
|
<a name="5390"><span class="lineNum"> 5390 </span> : : </a>
|
||
|
<a name="5391"><span class="lineNum"> 5391 </span> : : /**</a>
|
||
|
<a name="5392"><span class="lineNum"> 5392 </span> : : * @brief Find position of a character of string.</a>
|
||
|
<a name="5393"><span class="lineNum"> 5393 </span> : : * @param __str String containing characters to locate.</a>
|
||
|
<a name="5394"><span class="lineNum"> 5394 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="5395"><span class="lineNum"> 5395 </span> : : * @return Index of first occurrence.</a>
|
||
|
<a name="5396"><span class="lineNum"> 5396 </span> : : *</a>
|
||
|
<a name="5397"><span class="lineNum"> 5397 </span> : : * Starting from @a __pos, searches forward for one of the</a>
|
||
|
<a name="5398"><span class="lineNum"> 5398 </span> : : * characters of @a __str within this string. If found,</a>
|
||
|
<a name="5399"><span class="lineNum"> 5399 </span> : : * returns the index where it was found. If not found, returns</a>
|
||
|
<a name="5400"><span class="lineNum"> 5400 </span> : : * npos.</a>
|
||
|
<a name="5401"><span class="lineNum"> 5401 </span> : : */</a>
|
||
|
<a name="5402"><span class="lineNum"> 5402 </span> : : size_type</a>
|
||
|
<a name="5403"><span class="lineNum"> 5403 </span> : : find_first_of(const basic_string& __str, size_type __pos = 0) const</a>
|
||
|
<a name="5404"><span class="lineNum"> 5404 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="5405"><span class="lineNum"> 5405 </span> : : { return this->find_first_of(__str.data(), __pos, __str.size()); }</a>
|
||
|
<a name="5406"><span class="lineNum"> 5406 </span> : : </a>
|
||
|
<a name="5407"><span class="lineNum"> 5407 </span> : : /**</a>
|
||
|
<a name="5408"><span class="lineNum"> 5408 </span> : : * @brief Find position of a character of C substring.</a>
|
||
|
<a name="5409"><span class="lineNum"> 5409 </span> : : * @param __s String containing characters to locate.</a>
|
||
|
<a name="5410"><span class="lineNum"> 5410 </span> : : * @param __pos Index of character to search from.</a>
|
||
|
<a name="5411"><span class="lineNum"> 5411 </span> : : * @param __n Number of characters from s to search for.</a>
|
||
|
<a name="5412"><span class="lineNum"> 5412 </span> : : * @return Index of first occurrence.</a>
|
||
|
<a name="5413"><span class="lineNum"> 5413 </span> : : *</a>
|
||
|
<a name="5414"><span class="lineNum"> 5414 </span> : : * Starting from @a __pos, searches forward for one of the</a>
|
||
|
<a name="5415"><span class="lineNum"> 5415 </span> : : * first @a __n characters of @a __s within this string. If</a>
|
||
|
<a name="5416"><span class="lineNum"> 5416 </span> : : * found, returns the index where it was found. If not found,</a>
|
||
|
<a name="5417"><span class="lineNum"> 5417 </span> : : * returns npos.</a>
|
||
|
<a name="5418"><span class="lineNum"> 5418 </span> : : */</a>
|
||
|
<a name="5419"><span class="lineNum"> 5419 </span> : : size_type</a>
|
||
|
<a name="5420"><span class="lineNum"> 5420 </span> : : find_first_of(const _CharT* __s, size_type __pos, size_type __n) const</a>
|
||
|
<a name="5421"><span class="lineNum"> 5421 </span> : : _GLIBCXX_NOEXCEPT;</a>
|
||
|
<a name="5422"><span class="lineNum"> 5422 </span> : : </a>
|
||
|
<a name="5423"><span class="lineNum"> 5423 </span> : : /**</a>
|
||
|
<a name="5424"><span class="lineNum"> 5424 </span> : : * @brief Find position of a character of C string.</a>
|
||
|
<a name="5425"><span class="lineNum"> 5425 </span> : : * @param __s String containing characters to locate.</a>
|
||
|
<a name="5426"><span class="lineNum"> 5426 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="5427"><span class="lineNum"> 5427 </span> : : * @return Index of first occurrence.</a>
|
||
|
<a name="5428"><span class="lineNum"> 5428 </span> : : *</a>
|
||
|
<a name="5429"><span class="lineNum"> 5429 </span> : : * Starting from @a __pos, searches forward for one of the</a>
|
||
|
<a name="5430"><span class="lineNum"> 5430 </span> : : * characters of @a __s within this string. If found, returns</a>
|
||
|
<a name="5431"><span class="lineNum"> 5431 </span> : : * the index where it was found. If not found, returns npos.</a>
|
||
|
<a name="5432"><span class="lineNum"> 5432 </span> : : */</a>
|
||
|
<a name="5433"><span class="lineNum"> 5433 </span> : : size_type</a>
|
||
|
<a name="5434"><span class="lineNum"> 5434 </span> : : find_first_of(const _CharT* __s, size_type __pos = 0) const</a>
|
||
|
<a name="5435"><span class="lineNum"> 5435 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="5436"><span class="lineNum"> 5436 </span> : : {</a>
|
||
|
<a name="5437"><span class="lineNum"> 5437 </span> : : __glibcxx_requires_string(__s);</a>
|
||
|
<a name="5438"><span class="lineNum"> 5438 </span> : : return this->find_first_of(__s, __pos, traits_type::length(__s));</a>
|
||
|
<a name="5439"><span class="lineNum"> 5439 </span> : : }</a>
|
||
|
<a name="5440"><span class="lineNum"> 5440 </span> : : </a>
|
||
|
<a name="5441"><span class="lineNum"> 5441 </span> : : /**</a>
|
||
|
<a name="5442"><span class="lineNum"> 5442 </span> : : * @brief Find position of a character.</a>
|
||
|
<a name="5443"><span class="lineNum"> 5443 </span> : : * @param __c Character to locate.</a>
|
||
|
<a name="5444"><span class="lineNum"> 5444 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="5445"><span class="lineNum"> 5445 </span> : : * @return Index of first occurrence.</a>
|
||
|
<a name="5446"><span class="lineNum"> 5446 </span> : : *</a>
|
||
|
<a name="5447"><span class="lineNum"> 5447 </span> : : * Starting from @a __pos, searches forward for the character</a>
|
||
|
<a name="5448"><span class="lineNum"> 5448 </span> : : * @a __c within this string. If found, returns the index</a>
|
||
|
<a name="5449"><span class="lineNum"> 5449 </span> : : * where it was found. If not found, returns npos.</a>
|
||
|
<a name="5450"><span class="lineNum"> 5450 </span> : : *</a>
|
||
|
<a name="5451"><span class="lineNum"> 5451 </span> : : * Note: equivalent to find(__c, __pos).</a>
|
||
|
<a name="5452"><span class="lineNum"> 5452 </span> : : */</a>
|
||
|
<a name="5453"><span class="lineNum"> 5453 </span> : : size_type</a>
|
||
|
<a name="5454"><span class="lineNum"> 5454 </span> : : find_first_of(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="5455"><span class="lineNum"> 5455 </span> : : { return this->find(__c, __pos); }</a>
|
||
|
<a name="5456"><span class="lineNum"> 5456 </span> : : </a>
|
||
|
<a name="5457"><span class="lineNum"> 5457 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="5458"><span class="lineNum"> 5458 </span> : : /**</a>
|
||
|
<a name="5459"><span class="lineNum"> 5459 </span> : : * @brief Find position of a character of a string_view.</a>
|
||
|
<a name="5460"><span class="lineNum"> 5460 </span> : : * @param __svt An object convertible to string_view containing</a>
|
||
|
<a name="5461"><span class="lineNum"> 5461 </span> : : * characters to locate.</a>
|
||
|
<a name="5462"><span class="lineNum"> 5462 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="5463"><span class="lineNum"> 5463 </span> : : * @return Index of first occurrence.</a>
|
||
|
<a name="5464"><span class="lineNum"> 5464 </span> : : */</a>
|
||
|
<a name="5465"><span class="lineNum"> 5465 </span> : : template<typename _Tp></a>
|
||
|
<a name="5466"><span class="lineNum"> 5466 </span> : : _If_sv<_Tp, size_type></a>
|
||
|
<a name="5467"><span class="lineNum"> 5467 </span> : : find_first_of(const _Tp& __svt, size_type __pos = 0) const</a>
|
||
|
<a name="5468"><span class="lineNum"> 5468 </span> : : noexcept(is_same<_Tp, __sv_type>::value)</a>
|
||
|
<a name="5469"><span class="lineNum"> 5469 </span> : : {</a>
|
||
|
<a name="5470"><span class="lineNum"> 5470 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="5471"><span class="lineNum"> 5471 </span> : : return this->find_first_of(__sv.data(), __pos, __sv.size());</a>
|
||
|
<a name="5472"><span class="lineNum"> 5472 </span> : : }</a>
|
||
|
<a name="5473"><span class="lineNum"> 5473 </span> : : #endif // C++17</a>
|
||
|
<a name="5474"><span class="lineNum"> 5474 </span> : : </a>
|
||
|
<a name="5475"><span class="lineNum"> 5475 </span> : : /**</a>
|
||
|
<a name="5476"><span class="lineNum"> 5476 </span> : : * @brief Find last position of a character of string.</a>
|
||
|
<a name="5477"><span class="lineNum"> 5477 </span> : : * @param __str String containing characters to locate.</a>
|
||
|
<a name="5478"><span class="lineNum"> 5478 </span> : : * @param __pos Index of character to search back from (default end).</a>
|
||
|
<a name="5479"><span class="lineNum"> 5479 </span> : : * @return Index of last occurrence.</a>
|
||
|
<a name="5480"><span class="lineNum"> 5480 </span> : : *</a>
|
||
|
<a name="5481"><span class="lineNum"> 5481 </span> : : * Starting from @a __pos, searches backward for one of the</a>
|
||
|
<a name="5482"><span class="lineNum"> 5482 </span> : : * characters of @a __str within this string. If found,</a>
|
||
|
<a name="5483"><span class="lineNum"> 5483 </span> : : * returns the index where it was found. If not found, returns</a>
|
||
|
<a name="5484"><span class="lineNum"> 5484 </span> : : * npos.</a>
|
||
|
<a name="5485"><span class="lineNum"> 5485 </span> : : */</a>
|
||
|
<a name="5486"><span class="lineNum"> 5486 </span> : : size_type</a>
|
||
|
<a name="5487"><span class="lineNum"> 5487 </span> : : find_last_of(const basic_string& __str, size_type __pos = npos) const</a>
|
||
|
<a name="5488"><span class="lineNum"> 5488 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="5489"><span class="lineNum"> 5489 </span> : : { return this->find_last_of(__str.data(), __pos, __str.size()); }</a>
|
||
|
<a name="5490"><span class="lineNum"> 5490 </span> : : </a>
|
||
|
<a name="5491"><span class="lineNum"> 5491 </span> : : /**</a>
|
||
|
<a name="5492"><span class="lineNum"> 5492 </span> : : * @brief Find last position of a character of C substring.</a>
|
||
|
<a name="5493"><span class="lineNum"> 5493 </span> : : * @param __s C string containing characters to locate.</a>
|
||
|
<a name="5494"><span class="lineNum"> 5494 </span> : : * @param __pos Index of character to search back from.</a>
|
||
|
<a name="5495"><span class="lineNum"> 5495 </span> : : * @param __n Number of characters from s to search for.</a>
|
||
|
<a name="5496"><span class="lineNum"> 5496 </span> : : * @return Index of last occurrence.</a>
|
||
|
<a name="5497"><span class="lineNum"> 5497 </span> : : *</a>
|
||
|
<a name="5498"><span class="lineNum"> 5498 </span> : : * Starting from @a __pos, searches backward for one of the</a>
|
||
|
<a name="5499"><span class="lineNum"> 5499 </span> : : * first @a __n characters of @a __s within this string. If</a>
|
||
|
<a name="5500"><span class="lineNum"> 5500 </span> : : * found, returns the index where it was found. If not found,</a>
|
||
|
<a name="5501"><span class="lineNum"> 5501 </span> : : * returns npos.</a>
|
||
|
<a name="5502"><span class="lineNum"> 5502 </span> : : */</a>
|
||
|
<a name="5503"><span class="lineNum"> 5503 </span> : : size_type</a>
|
||
|
<a name="5504"><span class="lineNum"> 5504 </span> : : find_last_of(const _CharT* __s, size_type __pos, size_type __n) const</a>
|
||
|
<a name="5505"><span class="lineNum"> 5505 </span> : : _GLIBCXX_NOEXCEPT;</a>
|
||
|
<a name="5506"><span class="lineNum"> 5506 </span> : : </a>
|
||
|
<a name="5507"><span class="lineNum"> 5507 </span> : : /**</a>
|
||
|
<a name="5508"><span class="lineNum"> 5508 </span> : : * @brief Find last position of a character of C string.</a>
|
||
|
<a name="5509"><span class="lineNum"> 5509 </span> : : * @param __s C string containing characters to locate.</a>
|
||
|
<a name="5510"><span class="lineNum"> 5510 </span> : : * @param __pos Index of character to search back from (default end).</a>
|
||
|
<a name="5511"><span class="lineNum"> 5511 </span> : : * @return Index of last occurrence.</a>
|
||
|
<a name="5512"><span class="lineNum"> 5512 </span> : : *</a>
|
||
|
<a name="5513"><span class="lineNum"> 5513 </span> : : * Starting from @a __pos, searches backward for one of the</a>
|
||
|
<a name="5514"><span class="lineNum"> 5514 </span> : : * characters of @a __s within this string. If found, returns</a>
|
||
|
<a name="5515"><span class="lineNum"> 5515 </span> : : * the index where it was found. If not found, returns npos.</a>
|
||
|
<a name="5516"><span class="lineNum"> 5516 </span> : : */</a>
|
||
|
<a name="5517"><span class="lineNum"> 5517 </span> : : size_type</a>
|
||
|
<a name="5518"><span class="lineNum"> 5518 </span> : : find_last_of(const _CharT* __s, size_type __pos = npos) const</a>
|
||
|
<a name="5519"><span class="lineNum"> 5519 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="5520"><span class="lineNum"> 5520 </span> : : {</a>
|
||
|
<a name="5521"><span class="lineNum"> 5521 </span> : : __glibcxx_requires_string(__s);</a>
|
||
|
<a name="5522"><span class="lineNum"> 5522 </span> : : return this->find_last_of(__s, __pos, traits_type::length(__s));</a>
|
||
|
<a name="5523"><span class="lineNum"> 5523 </span> : : }</a>
|
||
|
<a name="5524"><span class="lineNum"> 5524 </span> : : </a>
|
||
|
<a name="5525"><span class="lineNum"> 5525 </span> : : /**</a>
|
||
|
<a name="5526"><span class="lineNum"> 5526 </span> : : * @brief Find last position of a character.</a>
|
||
|
<a name="5527"><span class="lineNum"> 5527 </span> : : * @param __c Character to locate.</a>
|
||
|
<a name="5528"><span class="lineNum"> 5528 </span> : : * @param __pos Index of character to search back from (default end).</a>
|
||
|
<a name="5529"><span class="lineNum"> 5529 </span> : : * @return Index of last occurrence.</a>
|
||
|
<a name="5530"><span class="lineNum"> 5530 </span> : : *</a>
|
||
|
<a name="5531"><span class="lineNum"> 5531 </span> : : * Starting from @a __pos, searches backward for @a __c within</a>
|
||
|
<a name="5532"><span class="lineNum"> 5532 </span> : : * this string. If found, returns the index where it was</a>
|
||
|
<a name="5533"><span class="lineNum"> 5533 </span> : : * found. If not found, returns npos.</a>
|
||
|
<a name="5534"><span class="lineNum"> 5534 </span> : : *</a>
|
||
|
<a name="5535"><span class="lineNum"> 5535 </span> : : * Note: equivalent to rfind(__c, __pos).</a>
|
||
|
<a name="5536"><span class="lineNum"> 5536 </span> : : */</a>
|
||
|
<a name="5537"><span class="lineNum"> 5537 </span> : : size_type</a>
|
||
|
<a name="5538"><span class="lineNum"> 5538 </span> : : find_last_of(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="5539"><span class="lineNum"> 5539 </span> : : { return this->rfind(__c, __pos); }</a>
|
||
|
<a name="5540"><span class="lineNum"> 5540 </span> : : </a>
|
||
|
<a name="5541"><span class="lineNum"> 5541 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="5542"><span class="lineNum"> 5542 </span> : : /**</a>
|
||
|
<a name="5543"><span class="lineNum"> 5543 </span> : : * @brief Find last position of a character of string.</a>
|
||
|
<a name="5544"><span class="lineNum"> 5544 </span> : : * @param __svt An object convertible to string_view containing</a>
|
||
|
<a name="5545"><span class="lineNum"> 5545 </span> : : * characters to locate.</a>
|
||
|
<a name="5546"><span class="lineNum"> 5546 </span> : : * @param __pos Index of character to search back from (default end).</a>
|
||
|
<a name="5547"><span class="lineNum"> 5547 </span> : : * @return Index of last occurrence.</a>
|
||
|
<a name="5548"><span class="lineNum"> 5548 </span> : : */</a>
|
||
|
<a name="5549"><span class="lineNum"> 5549 </span> : : template<typename _Tp></a>
|
||
|
<a name="5550"><span class="lineNum"> 5550 </span> : : _If_sv<_Tp, size_type></a>
|
||
|
<a name="5551"><span class="lineNum"> 5551 </span> : : find_last_of(const _Tp& __svt, size_type __pos = npos) const</a>
|
||
|
<a name="5552"><span class="lineNum"> 5552 </span> : : noexcept(is_same<_Tp, __sv_type>::value)</a>
|
||
|
<a name="5553"><span class="lineNum"> 5553 </span> : : {</a>
|
||
|
<a name="5554"><span class="lineNum"> 5554 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="5555"><span class="lineNum"> 5555 </span> : : return this->find_last_of(__sv.data(), __pos, __sv.size());</a>
|
||
|
<a name="5556"><span class="lineNum"> 5556 </span> : : }</a>
|
||
|
<a name="5557"><span class="lineNum"> 5557 </span> : : #endif // C++17</a>
|
||
|
<a name="5558"><span class="lineNum"> 5558 </span> : : </a>
|
||
|
<a name="5559"><span class="lineNum"> 5559 </span> : : /**</a>
|
||
|
<a name="5560"><span class="lineNum"> 5560 </span> : : * @brief Find position of a character not in string.</a>
|
||
|
<a name="5561"><span class="lineNum"> 5561 </span> : : * @param __str String containing characters to avoid.</a>
|
||
|
<a name="5562"><span class="lineNum"> 5562 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="5563"><span class="lineNum"> 5563 </span> : : * @return Index of first occurrence.</a>
|
||
|
<a name="5564"><span class="lineNum"> 5564 </span> : : *</a>
|
||
|
<a name="5565"><span class="lineNum"> 5565 </span> : : * Starting from @a __pos, searches forward for a character not contained</a>
|
||
|
<a name="5566"><span class="lineNum"> 5566 </span> : : * in @a __str within this string. If found, returns the index where it</a>
|
||
|
<a name="5567"><span class="lineNum"> 5567 </span> : : * was found. If not found, returns npos.</a>
|
||
|
<a name="5568"><span class="lineNum"> 5568 </span> : : */</a>
|
||
|
<a name="5569"><span class="lineNum"> 5569 </span> : : size_type</a>
|
||
|
<a name="5570"><span class="lineNum"> 5570 </span> : : find_first_not_of(const basic_string& __str, size_type __pos = 0) const</a>
|
||
|
<a name="5571"><span class="lineNum"> 5571 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="5572"><span class="lineNum"> 5572 </span> : : { return this->find_first_not_of(__str.data(), __pos, __str.size()); }</a>
|
||
|
<a name="5573"><span class="lineNum"> 5573 </span> : : </a>
|
||
|
<a name="5574"><span class="lineNum"> 5574 </span> : : /**</a>
|
||
|
<a name="5575"><span class="lineNum"> 5575 </span> : : * @brief Find position of a character not in C substring.</a>
|
||
|
<a name="5576"><span class="lineNum"> 5576 </span> : : * @param __s C string containing characters to avoid.</a>
|
||
|
<a name="5577"><span class="lineNum"> 5577 </span> : : * @param __pos Index of character to search from.</a>
|
||
|
<a name="5578"><span class="lineNum"> 5578 </span> : : * @param __n Number of characters from __s to consider.</a>
|
||
|
<a name="5579"><span class="lineNum"> 5579 </span> : : * @return Index of first occurrence.</a>
|
||
|
<a name="5580"><span class="lineNum"> 5580 </span> : : *</a>
|
||
|
<a name="5581"><span class="lineNum"> 5581 </span> : : * Starting from @a __pos, searches forward for a character not</a>
|
||
|
<a name="5582"><span class="lineNum"> 5582 </span> : : * contained in the first @a __n characters of @a __s within</a>
|
||
|
<a name="5583"><span class="lineNum"> 5583 </span> : : * this string. If found, returns the index where it was</a>
|
||
|
<a name="5584"><span class="lineNum"> 5584 </span> : : * found. If not found, returns npos.</a>
|
||
|
<a name="5585"><span class="lineNum"> 5585 </span> : : */</a>
|
||
|
<a name="5586"><span class="lineNum"> 5586 </span> : : size_type</a>
|
||
|
<a name="5587"><span class="lineNum"> 5587 </span> : : find_first_not_of(const _CharT* __s, size_type __pos,</a>
|
||
|
<a name="5588"><span class="lineNum"> 5588 </span> : : size_type __n) const _GLIBCXX_NOEXCEPT;</a>
|
||
|
<a name="5589"><span class="lineNum"> 5589 </span> : : </a>
|
||
|
<a name="5590"><span class="lineNum"> 5590 </span> : : /**</a>
|
||
|
<a name="5591"><span class="lineNum"> 5591 </span> : : * @brief Find position of a character not in C string.</a>
|
||
|
<a name="5592"><span class="lineNum"> 5592 </span> : : * @param __s C string containing characters to avoid.</a>
|
||
|
<a name="5593"><span class="lineNum"> 5593 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="5594"><span class="lineNum"> 5594 </span> : : * @return Index of first occurrence.</a>
|
||
|
<a name="5595"><span class="lineNum"> 5595 </span> : : *</a>
|
||
|
<a name="5596"><span class="lineNum"> 5596 </span> : : * Starting from @a __pos, searches forward for a character not</a>
|
||
|
<a name="5597"><span class="lineNum"> 5597 </span> : : * contained in @a __s within this string. If found, returns</a>
|
||
|
<a name="5598"><span class="lineNum"> 5598 </span> : : * the index where it was found. If not found, returns npos.</a>
|
||
|
<a name="5599"><span class="lineNum"> 5599 </span> : : */</a>
|
||
|
<a name="5600"><span class="lineNum"> 5600 </span> : : size_type</a>
|
||
|
<a name="5601"><span class="lineNum"> 5601 </span> : : find_first_not_of(const _CharT* __s, size_type __pos = 0) const</a>
|
||
|
<a name="5602"><span class="lineNum"> 5602 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="5603"><span class="lineNum"> 5603 </span> : : {</a>
|
||
|
<a name="5604"><span class="lineNum"> 5604 </span> : : __glibcxx_requires_string(__s);</a>
|
||
|
<a name="5605"><span class="lineNum"> 5605 </span> : : return this->find_first_not_of(__s, __pos, traits_type::length(__s));</a>
|
||
|
<a name="5606"><span class="lineNum"> 5606 </span> : : }</a>
|
||
|
<a name="5607"><span class="lineNum"> 5607 </span> : : </a>
|
||
|
<a name="5608"><span class="lineNum"> 5608 </span> : : /**</a>
|
||
|
<a name="5609"><span class="lineNum"> 5609 </span> : : * @brief Find position of a different character.</a>
|
||
|
<a name="5610"><span class="lineNum"> 5610 </span> : : * @param __c Character to avoid.</a>
|
||
|
<a name="5611"><span class="lineNum"> 5611 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="5612"><span class="lineNum"> 5612 </span> : : * @return Index of first occurrence.</a>
|
||
|
<a name="5613"><span class="lineNum"> 5613 </span> : : *</a>
|
||
|
<a name="5614"><span class="lineNum"> 5614 </span> : : * Starting from @a __pos, searches forward for a character</a>
|
||
|
<a name="5615"><span class="lineNum"> 5615 </span> : : * other than @a __c within this string. If found, returns the</a>
|
||
|
<a name="5616"><span class="lineNum"> 5616 </span> : : * index where it was found. If not found, returns npos.</a>
|
||
|
<a name="5617"><span class="lineNum"> 5617 </span> : : */</a>
|
||
|
<a name="5618"><span class="lineNum"> 5618 </span> : : size_type</a>
|
||
|
<a name="5619"><span class="lineNum"> 5619 </span> : : find_first_not_of(_CharT __c, size_type __pos = 0) const</a>
|
||
|
<a name="5620"><span class="lineNum"> 5620 </span> : : _GLIBCXX_NOEXCEPT;</a>
|
||
|
<a name="5621"><span class="lineNum"> 5621 </span> : : </a>
|
||
|
<a name="5622"><span class="lineNum"> 5622 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="5623"><span class="lineNum"> 5623 </span> : : /**</a>
|
||
|
<a name="5624"><span class="lineNum"> 5624 </span> : : * @brief Find position of a character not in a string_view.</a>
|
||
|
<a name="5625"><span class="lineNum"> 5625 </span> : : * @param __svt An object convertible to string_view containing</a>
|
||
|
<a name="5626"><span class="lineNum"> 5626 </span> : : * characters to avoid.</a>
|
||
|
<a name="5627"><span class="lineNum"> 5627 </span> : : * @param __pos Index of character to search from (default 0).</a>
|
||
|
<a name="5628"><span class="lineNum"> 5628 </span> : : * @return Index of first occurrence.</a>
|
||
|
<a name="5629"><span class="lineNum"> 5629 </span> : : */</a>
|
||
|
<a name="5630"><span class="lineNum"> 5630 </span> : : template<typename _Tp></a>
|
||
|
<a name="5631"><span class="lineNum"> 5631 </span> : : _If_sv<_Tp, size_type></a>
|
||
|
<a name="5632"><span class="lineNum"> 5632 </span> : : find_first_not_of(const _Tp& __svt, size_type __pos = 0) const</a>
|
||
|
<a name="5633"><span class="lineNum"> 5633 </span> : : noexcept(is_same<_Tp, __sv_type>::value)</a>
|
||
|
<a name="5634"><span class="lineNum"> 5634 </span> : : {</a>
|
||
|
<a name="5635"><span class="lineNum"> 5635 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="5636"><span class="lineNum"> 5636 </span> : : return this->find_first_not_of(__sv.data(), __pos, __sv.size());</a>
|
||
|
<a name="5637"><span class="lineNum"> 5637 </span> : : }</a>
|
||
|
<a name="5638"><span class="lineNum"> 5638 </span> : : #endif // C++17</a>
|
||
|
<a name="5639"><span class="lineNum"> 5639 </span> : : </a>
|
||
|
<a name="5640"><span class="lineNum"> 5640 </span> : : /**</a>
|
||
|
<a name="5641"><span class="lineNum"> 5641 </span> : : * @brief Find last position of a character not in string.</a>
|
||
|
<a name="5642"><span class="lineNum"> 5642 </span> : : * @param __str String containing characters to avoid.</a>
|
||
|
<a name="5643"><span class="lineNum"> 5643 </span> : : * @param __pos Index of character to search back from (default end).</a>
|
||
|
<a name="5644"><span class="lineNum"> 5644 </span> : : * @return Index of last occurrence.</a>
|
||
|
<a name="5645"><span class="lineNum"> 5645 </span> : : *</a>
|
||
|
<a name="5646"><span class="lineNum"> 5646 </span> : : * Starting from @a __pos, searches backward for a character</a>
|
||
|
<a name="5647"><span class="lineNum"> 5647 </span> : : * not contained in @a __str within this string. If found,</a>
|
||
|
<a name="5648"><span class="lineNum"> 5648 </span> : : * returns the index where it was found. If not found, returns</a>
|
||
|
<a name="5649"><span class="lineNum"> 5649 </span> : : * npos.</a>
|
||
|
<a name="5650"><span class="lineNum"> 5650 </span> : : */</a>
|
||
|
<a name="5651"><span class="lineNum"> 5651 </span> : : size_type</a>
|
||
|
<a name="5652"><span class="lineNum"> 5652 </span> : : find_last_not_of(const basic_string& __str, size_type __pos = npos) const</a>
|
||
|
<a name="5653"><span class="lineNum"> 5653 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="5654"><span class="lineNum"> 5654 </span> : : { return this->find_last_not_of(__str.data(), __pos, __str.size()); }</a>
|
||
|
<a name="5655"><span class="lineNum"> 5655 </span> : : </a>
|
||
|
<a name="5656"><span class="lineNum"> 5656 </span> : : /**</a>
|
||
|
<a name="5657"><span class="lineNum"> 5657 </span> : : * @brief Find last position of a character not in C substring.</a>
|
||
|
<a name="5658"><span class="lineNum"> 5658 </span> : : * @param __s C string containing characters to avoid.</a>
|
||
|
<a name="5659"><span class="lineNum"> 5659 </span> : : * @param __pos Index of character to search back from.</a>
|
||
|
<a name="5660"><span class="lineNum"> 5660 </span> : : * @param __n Number of characters from s to consider.</a>
|
||
|
<a name="5661"><span class="lineNum"> 5661 </span> : : * @return Index of last occurrence.</a>
|
||
|
<a name="5662"><span class="lineNum"> 5662 </span> : : *</a>
|
||
|
<a name="5663"><span class="lineNum"> 5663 </span> : : * Starting from @a __pos, searches backward for a character not</a>
|
||
|
<a name="5664"><span class="lineNum"> 5664 </span> : : * contained in the first @a __n characters of @a __s within this string.</a>
|
||
|
<a name="5665"><span class="lineNum"> 5665 </span> : : * If found, returns the index where it was found. If not found,</a>
|
||
|
<a name="5666"><span class="lineNum"> 5666 </span> : : * returns npos.</a>
|
||
|
<a name="5667"><span class="lineNum"> 5667 </span> : : */</a>
|
||
|
<a name="5668"><span class="lineNum"> 5668 </span> : : size_type</a>
|
||
|
<a name="5669"><span class="lineNum"> 5669 </span> : : find_last_not_of(const _CharT* __s, size_type __pos,</a>
|
||
|
<a name="5670"><span class="lineNum"> 5670 </span> : : size_type __n) const _GLIBCXX_NOEXCEPT;</a>
|
||
|
<a name="5671"><span class="lineNum"> 5671 </span> : : /**</a>
|
||
|
<a name="5672"><span class="lineNum"> 5672 </span> : : * @brief Find last position of a character not in C string.</a>
|
||
|
<a name="5673"><span class="lineNum"> 5673 </span> : : * @param __s C string containing characters to avoid.</a>
|
||
|
<a name="5674"><span class="lineNum"> 5674 </span> : : * @param __pos Index of character to search back from (default end).</a>
|
||
|
<a name="5675"><span class="lineNum"> 5675 </span> : : * @return Index of last occurrence.</a>
|
||
|
<a name="5676"><span class="lineNum"> 5676 </span> : : *</a>
|
||
|
<a name="5677"><span class="lineNum"> 5677 </span> : : * Starting from @a __pos, searches backward for a character</a>
|
||
|
<a name="5678"><span class="lineNum"> 5678 </span> : : * not contained in @a __s within this string. If found,</a>
|
||
|
<a name="5679"><span class="lineNum"> 5679 </span> : : * returns the index where it was found. If not found, returns</a>
|
||
|
<a name="5680"><span class="lineNum"> 5680 </span> : : * npos.</a>
|
||
|
<a name="5681"><span class="lineNum"> 5681 </span> : : */</a>
|
||
|
<a name="5682"><span class="lineNum"> 5682 </span> : : size_type</a>
|
||
|
<a name="5683"><span class="lineNum"> 5683 </span> : : find_last_not_of(const _CharT* __s, size_type __pos = npos) const</a>
|
||
|
<a name="5684"><span class="lineNum"> 5684 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="5685"><span class="lineNum"> 5685 </span> : : {</a>
|
||
|
<a name="5686"><span class="lineNum"> 5686 </span> : : __glibcxx_requires_string(__s);</a>
|
||
|
<a name="5687"><span class="lineNum"> 5687 </span> : : return this->find_last_not_of(__s, __pos, traits_type::length(__s));</a>
|
||
|
<a name="5688"><span class="lineNum"> 5688 </span> : : }</a>
|
||
|
<a name="5689"><span class="lineNum"> 5689 </span> : : </a>
|
||
|
<a name="5690"><span class="lineNum"> 5690 </span> : : /**</a>
|
||
|
<a name="5691"><span class="lineNum"> 5691 </span> : : * @brief Find last position of a different character.</a>
|
||
|
<a name="5692"><span class="lineNum"> 5692 </span> : : * @param __c Character to avoid.</a>
|
||
|
<a name="5693"><span class="lineNum"> 5693 </span> : : * @param __pos Index of character to search back from (default end).</a>
|
||
|
<a name="5694"><span class="lineNum"> 5694 </span> : : * @return Index of last occurrence.</a>
|
||
|
<a name="5695"><span class="lineNum"> 5695 </span> : : *</a>
|
||
|
<a name="5696"><span class="lineNum"> 5696 </span> : : * Starting from @a __pos, searches backward for a character other than</a>
|
||
|
<a name="5697"><span class="lineNum"> 5697 </span> : : * @a __c within this string. If found, returns the index where it was</a>
|
||
|
<a name="5698"><span class="lineNum"> 5698 </span> : : * found. If not found, returns npos.</a>
|
||
|
<a name="5699"><span class="lineNum"> 5699 </span> : : */</a>
|
||
|
<a name="5700"><span class="lineNum"> 5700 </span> : : size_type</a>
|
||
|
<a name="5701"><span class="lineNum"> 5701 </span> : : find_last_not_of(_CharT __c, size_type __pos = npos) const</a>
|
||
|
<a name="5702"><span class="lineNum"> 5702 </span> : : _GLIBCXX_NOEXCEPT;</a>
|
||
|
<a name="5703"><span class="lineNum"> 5703 </span> : : </a>
|
||
|
<a name="5704"><span class="lineNum"> 5704 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="5705"><span class="lineNum"> 5705 </span> : : /**</a>
|
||
|
<a name="5706"><span class="lineNum"> 5706 </span> : : * @brief Find last position of a character not in a string_view.</a>
|
||
|
<a name="5707"><span class="lineNum"> 5707 </span> : : * @param __svt An object convertible to string_view containing</a>
|
||
|
<a name="5708"><span class="lineNum"> 5708 </span> : : * characters to avoid.</a>
|
||
|
<a name="5709"><span class="lineNum"> 5709 </span> : : * @param __pos Index of character to search back from (default end).</a>
|
||
|
<a name="5710"><span class="lineNum"> 5710 </span> : : * @return Index of last occurrence.</a>
|
||
|
<a name="5711"><span class="lineNum"> 5711 </span> : : */</a>
|
||
|
<a name="5712"><span class="lineNum"> 5712 </span> : : template<typename _Tp></a>
|
||
|
<a name="5713"><span class="lineNum"> 5713 </span> : : _If_sv<_Tp, size_type></a>
|
||
|
<a name="5714"><span class="lineNum"> 5714 </span> : : find_last_not_of(const _Tp& __svt, size_type __pos = npos) const</a>
|
||
|
<a name="5715"><span class="lineNum"> 5715 </span> : : noexcept(is_same<_Tp, __sv_type>::value)</a>
|
||
|
<a name="5716"><span class="lineNum"> 5716 </span> : : {</a>
|
||
|
<a name="5717"><span class="lineNum"> 5717 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="5718"><span class="lineNum"> 5718 </span> : : return this->find_last_not_of(__sv.data(), __pos, __sv.size());</a>
|
||
|
<a name="5719"><span class="lineNum"> 5719 </span> : : }</a>
|
||
|
<a name="5720"><span class="lineNum"> 5720 </span> : : #endif // C++17</a>
|
||
|
<a name="5721"><span class="lineNum"> 5721 </span> : : </a>
|
||
|
<a name="5722"><span class="lineNum"> 5722 </span> : : /**</a>
|
||
|
<a name="5723"><span class="lineNum"> 5723 </span> : : * @brief Get a substring.</a>
|
||
|
<a name="5724"><span class="lineNum"> 5724 </span> : : * @param __pos Index of first character (default 0).</a>
|
||
|
<a name="5725"><span class="lineNum"> 5725 </span> : : * @param __n Number of characters in substring (default remainder).</a>
|
||
|
<a name="5726"><span class="lineNum"> 5726 </span> : : * @return The new string.</a>
|
||
|
<a name="5727"><span class="lineNum"> 5727 </span> : : * @throw std::out_of_range If __pos > size().</a>
|
||
|
<a name="5728"><span class="lineNum"> 5728 </span> : : *</a>
|
||
|
<a name="5729"><span class="lineNum"> 5729 </span> : : * Construct and return a new string using the @a __n</a>
|
||
|
<a name="5730"><span class="lineNum"> 5730 </span> : : * characters starting at @a __pos. If the string is too</a>
|
||
|
<a name="5731"><span class="lineNum"> 5731 </span> : : * short, use the remainder of the characters. If @a __pos is</a>
|
||
|
<a name="5732"><span class="lineNum"> 5732 </span> : : * beyond the end of the string, out_of_range is thrown.</a>
|
||
|
<a name="5733"><span class="lineNum"> 5733 </span> : : */</a>
|
||
|
<a name="5734"><span class="lineNum"> 5734 </span> : : basic_string</a>
|
||
|
<a name="5735"><span class="lineNum"> 5735 </span> : : substr(size_type __pos = 0, size_type __n = npos) const</a>
|
||
|
<a name="5736"><span class="lineNum"> 5736 </span> : : { return basic_string(*this,</a>
|
||
|
<a name="5737"><span class="lineNum"> 5737 </span> : : _M_check(__pos, "basic_string::substr"), __n); }</a>
|
||
|
<a name="5738"><span class="lineNum"> 5738 </span> : : </a>
|
||
|
<a name="5739"><span class="lineNum"> 5739 </span> : : /**</a>
|
||
|
<a name="5740"><span class="lineNum"> 5740 </span> : : * @brief Compare to a string.</a>
|
||
|
<a name="5741"><span class="lineNum"> 5741 </span> : : * @param __str String to compare against.</a>
|
||
|
<a name="5742"><span class="lineNum"> 5742 </span> : : * @return Integer < 0, 0, or > 0.</a>
|
||
|
<a name="5743"><span class="lineNum"> 5743 </span> : : *</a>
|
||
|
<a name="5744"><span class="lineNum"> 5744 </span> : : * Returns an integer < 0 if this string is ordered before @a</a>
|
||
|
<a name="5745"><span class="lineNum"> 5745 </span> : : * __str, 0 if their values are equivalent, or > 0 if this</a>
|
||
|
<a name="5746"><span class="lineNum"> 5746 </span> : : * string is ordered after @a __str. Determines the effective</a>
|
||
|
<a name="5747"><span class="lineNum"> 5747 </span> : : * length rlen of the strings to compare as the smallest of</a>
|
||
|
<a name="5748"><span class="lineNum"> 5748 </span> : : * size() and str.size(). The function then compares the two</a>
|
||
|
<a name="5749"><span class="lineNum"> 5749 </span> : : * strings by calling traits::compare(data(), str.data(),rlen).</a>
|
||
|
<a name="5750"><span class="lineNum"> 5750 </span> : : * If the result of the comparison is nonzero returns it,</a>
|
||
|
<a name="5751"><span class="lineNum"> 5751 </span> : : * otherwise the shorter one is ordered first.</a>
|
||
|
<a name="5752"><span class="lineNum"> 5752 </span> : : */</a>
|
||
|
<a name="5753"><span class="lineNum"> 5753 </span> : : int</a>
|
||
|
<a name="5754"><span class="lineNum"> 5754 </span> : : compare(const basic_string& __str) const</a>
|
||
|
<a name="5755"><span class="lineNum"> 5755 </span> : : {</a>
|
||
|
<a name="5756"><span class="lineNum"> 5756 </span> : : const size_type __size = this->size();</a>
|
||
|
<a name="5757"><span class="lineNum"> 5757 </span> : : const size_type __osize = __str.size();</a>
|
||
|
<a name="5758"><span class="lineNum"> 5758 </span> : : const size_type __len = std::min(__size, __osize);</a>
|
||
|
<a name="5759"><span class="lineNum"> 5759 </span> : : </a>
|
||
|
<a name="5760"><span class="lineNum"> 5760 </span> : : int __r = traits_type::compare(_M_data(), __str.data(), __len);</a>
|
||
|
<a name="5761"><span class="lineNum"> 5761 </span> : : if (!__r)</a>
|
||
|
<a name="5762"><span class="lineNum"> 5762 </span> : : __r = _S_compare(__size, __osize);</a>
|
||
|
<a name="5763"><span class="lineNum"> 5763 </span> : : return __r;</a>
|
||
|
<a name="5764"><span class="lineNum"> 5764 </span> : : }</a>
|
||
|
<a name="5765"><span class="lineNum"> 5765 </span> : : </a>
|
||
|
<a name="5766"><span class="lineNum"> 5766 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="5767"><span class="lineNum"> 5767 </span> : : /**</a>
|
||
|
<a name="5768"><span class="lineNum"> 5768 </span> : : * @brief Compare to a string_view.</a>
|
||
|
<a name="5769"><span class="lineNum"> 5769 </span> : : * @param __svt An object convertible to string_view to compare against.</a>
|
||
|
<a name="5770"><span class="lineNum"> 5770 </span> : : * @return Integer < 0, 0, or > 0.</a>
|
||
|
<a name="5771"><span class="lineNum"> 5771 </span> : : */</a>
|
||
|
<a name="5772"><span class="lineNum"> 5772 </span> : : template<typename _Tp></a>
|
||
|
<a name="5773"><span class="lineNum"> 5773 </span> : : _If_sv<_Tp, int></a>
|
||
|
<a name="5774"><span class="lineNum"> 5774 </span> : : compare(const _Tp& __svt) const</a>
|
||
|
<a name="5775"><span class="lineNum"> 5775 </span> : : noexcept(is_same<_Tp, __sv_type>::value)</a>
|
||
|
<a name="5776"><span class="lineNum"> 5776 </span> : : {</a>
|
||
|
<a name="5777"><span class="lineNum"> 5777 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="5778"><span class="lineNum"> 5778 </span> : : const size_type __size = this->size();</a>
|
||
|
<a name="5779"><span class="lineNum"> 5779 </span> : : const size_type __osize = __sv.size();</a>
|
||
|
<a name="5780"><span class="lineNum"> 5780 </span> : : const size_type __len = std::min(__size, __osize);</a>
|
||
|
<a name="5781"><span class="lineNum"> 5781 </span> : : </a>
|
||
|
<a name="5782"><span class="lineNum"> 5782 </span> : : int __r = traits_type::compare(_M_data(), __sv.data(), __len);</a>
|
||
|
<a name="5783"><span class="lineNum"> 5783 </span> : : if (!__r)</a>
|
||
|
<a name="5784"><span class="lineNum"> 5784 </span> : : __r = _S_compare(__size, __osize);</a>
|
||
|
<a name="5785"><span class="lineNum"> 5785 </span> : : return __r;</a>
|
||
|
<a name="5786"><span class="lineNum"> 5786 </span> : : }</a>
|
||
|
<a name="5787"><span class="lineNum"> 5787 </span> : : </a>
|
||
|
<a name="5788"><span class="lineNum"> 5788 </span> : : /**</a>
|
||
|
<a name="5789"><span class="lineNum"> 5789 </span> : : * @brief Compare to a string_view.</a>
|
||
|
<a name="5790"><span class="lineNum"> 5790 </span> : : * @param __pos A position in the string to start comparing from.</a>
|
||
|
<a name="5791"><span class="lineNum"> 5791 </span> : : * @param __n The number of characters to compare.</a>
|
||
|
<a name="5792"><span class="lineNum"> 5792 </span> : : * @param __svt An object convertible to string_view to compare</a>
|
||
|
<a name="5793"><span class="lineNum"> 5793 </span> : : * against.</a>
|
||
|
<a name="5794"><span class="lineNum"> 5794 </span> : : * @return Integer < 0, 0, or > 0.</a>
|
||
|
<a name="5795"><span class="lineNum"> 5795 </span> : : */</a>
|
||
|
<a name="5796"><span class="lineNum"> 5796 </span> : : template<typename _Tp></a>
|
||
|
<a name="5797"><span class="lineNum"> 5797 </span> : : _If_sv<_Tp, int></a>
|
||
|
<a name="5798"><span class="lineNum"> 5798 </span> : : compare(size_type __pos, size_type __n, const _Tp& __svt) const</a>
|
||
|
<a name="5799"><span class="lineNum"> 5799 </span> : : noexcept(is_same<_Tp, __sv_type>::value)</a>
|
||
|
<a name="5800"><span class="lineNum"> 5800 </span> : : {</a>
|
||
|
<a name="5801"><span class="lineNum"> 5801 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="5802"><span class="lineNum"> 5802 </span> : : return __sv_type(*this).substr(__pos, __n).compare(__sv);</a>
|
||
|
<a name="5803"><span class="lineNum"> 5803 </span> : : }</a>
|
||
|
<a name="5804"><span class="lineNum"> 5804 </span> : : </a>
|
||
|
<a name="5805"><span class="lineNum"> 5805 </span> : : /**</a>
|
||
|
<a name="5806"><span class="lineNum"> 5806 </span> : : * @brief Compare to a string_view.</a>
|
||
|
<a name="5807"><span class="lineNum"> 5807 </span> : : * @param __pos1 A position in the string to start comparing from.</a>
|
||
|
<a name="5808"><span class="lineNum"> 5808 </span> : : * @param __n1 The number of characters to compare.</a>
|
||
|
<a name="5809"><span class="lineNum"> 5809 </span> : : * @param __svt An object convertible to string_view to compare</a>
|
||
|
<a name="5810"><span class="lineNum"> 5810 </span> : : * against.</a>
|
||
|
<a name="5811"><span class="lineNum"> 5811 </span> : : * @param __pos2 A position in the string_view to start comparing from.</a>
|
||
|
<a name="5812"><span class="lineNum"> 5812 </span> : : * @param __n2 The number of characters to compare.</a>
|
||
|
<a name="5813"><span class="lineNum"> 5813 </span> : : * @return Integer < 0, 0, or > 0.</a>
|
||
|
<a name="5814"><span class="lineNum"> 5814 </span> : : */</a>
|
||
|
<a name="5815"><span class="lineNum"> 5815 </span> : : template<typename _Tp></a>
|
||
|
<a name="5816"><span class="lineNum"> 5816 </span> : : _If_sv<_Tp, int></a>
|
||
|
<a name="5817"><span class="lineNum"> 5817 </span> : : compare(size_type __pos1, size_type __n1, const _Tp& __svt,</a>
|
||
|
<a name="5818"><span class="lineNum"> 5818 </span> : : size_type __pos2, size_type __n2 = npos) const</a>
|
||
|
<a name="5819"><span class="lineNum"> 5819 </span> : : noexcept(is_same<_Tp, __sv_type>::value)</a>
|
||
|
<a name="5820"><span class="lineNum"> 5820 </span> : : {</a>
|
||
|
<a name="5821"><span class="lineNum"> 5821 </span> : : __sv_type __sv = __svt;</a>
|
||
|
<a name="5822"><span class="lineNum"> 5822 </span> : : return __sv_type(*this)</a>
|
||
|
<a name="5823"><span class="lineNum"> 5823 </span> : : .substr(__pos1, __n1).compare(__sv.substr(__pos2, __n2));</a>
|
||
|
<a name="5824"><span class="lineNum"> 5824 </span> : : }</a>
|
||
|
<a name="5825"><span class="lineNum"> 5825 </span> : : #endif // C++17</a>
|
||
|
<a name="5826"><span class="lineNum"> 5826 </span> : : </a>
|
||
|
<a name="5827"><span class="lineNum"> 5827 </span> : : /**</a>
|
||
|
<a name="5828"><span class="lineNum"> 5828 </span> : : * @brief Compare substring to a string.</a>
|
||
|
<a name="5829"><span class="lineNum"> 5829 </span> : : * @param __pos Index of first character of substring.</a>
|
||
|
<a name="5830"><span class="lineNum"> 5830 </span> : : * @param __n Number of characters in substring.</a>
|
||
|
<a name="5831"><span class="lineNum"> 5831 </span> : : * @param __str String to compare against.</a>
|
||
|
<a name="5832"><span class="lineNum"> 5832 </span> : : * @return Integer < 0, 0, or > 0.</a>
|
||
|
<a name="5833"><span class="lineNum"> 5833 </span> : : *</a>
|
||
|
<a name="5834"><span class="lineNum"> 5834 </span> : : * Form the substring of this string from the @a __n characters</a>
|
||
|
<a name="5835"><span class="lineNum"> 5835 </span> : : * starting at @a __pos. Returns an integer < 0 if the</a>
|
||
|
<a name="5836"><span class="lineNum"> 5836 </span> : : * substring is ordered before @a __str, 0 if their values are</a>
|
||
|
<a name="5837"><span class="lineNum"> 5837 </span> : : * equivalent, or > 0 if the substring is ordered after @a</a>
|
||
|
<a name="5838"><span class="lineNum"> 5838 </span> : : * __str. Determines the effective length rlen of the strings</a>
|
||
|
<a name="5839"><span class="lineNum"> 5839 </span> : : * to compare as the smallest of the length of the substring</a>
|
||
|
<a name="5840"><span class="lineNum"> 5840 </span> : : * and @a __str.size(). The function then compares the two</a>
|
||
|
<a name="5841"><span class="lineNum"> 5841 </span> : : * strings by calling</a>
|
||
|
<a name="5842"><span class="lineNum"> 5842 </span> : : * traits::compare(substring.data(),str.data(),rlen). If the</a>
|
||
|
<a name="5843"><span class="lineNum"> 5843 </span> : : * result of the comparison is nonzero returns it, otherwise</a>
|
||
|
<a name="5844"><span class="lineNum"> 5844 </span> : : * the shorter one is ordered first.</a>
|
||
|
<a name="5845"><span class="lineNum"> 5845 </span> : : */</a>
|
||
|
<a name="5846"><span class="lineNum"> 5846 </span> : : int</a>
|
||
|
<a name="5847"><span class="lineNum"> 5847 </span> : : compare(size_type __pos, size_type __n, const basic_string& __str) const;</a>
|
||
|
<a name="5848"><span class="lineNum"> 5848 </span> : : </a>
|
||
|
<a name="5849"><span class="lineNum"> 5849 </span> : : /**</a>
|
||
|
<a name="5850"><span class="lineNum"> 5850 </span> : : * @brief Compare substring to a substring.</a>
|
||
|
<a name="5851"><span class="lineNum"> 5851 </span> : : * @param __pos1 Index of first character of substring.</a>
|
||
|
<a name="5852"><span class="lineNum"> 5852 </span> : : * @param __n1 Number of characters in substring.</a>
|
||
|
<a name="5853"><span class="lineNum"> 5853 </span> : : * @param __str String to compare against.</a>
|
||
|
<a name="5854"><span class="lineNum"> 5854 </span> : : * @param __pos2 Index of first character of substring of str.</a>
|
||
|
<a name="5855"><span class="lineNum"> 5855 </span> : : * @param __n2 Number of characters in substring of str.</a>
|
||
|
<a name="5856"><span class="lineNum"> 5856 </span> : : * @return Integer < 0, 0, or > 0.</a>
|
||
|
<a name="5857"><span class="lineNum"> 5857 </span> : : *</a>
|
||
|
<a name="5858"><span class="lineNum"> 5858 </span> : : * Form the substring of this string from the @a __n1</a>
|
||
|
<a name="5859"><span class="lineNum"> 5859 </span> : : * characters starting at @a __pos1. Form the substring of @a</a>
|
||
|
<a name="5860"><span class="lineNum"> 5860 </span> : : * __str from the @a __n2 characters starting at @a __pos2.</a>
|
||
|
<a name="5861"><span class="lineNum"> 5861 </span> : : * Returns an integer < 0 if this substring is ordered before</a>
|
||
|
<a name="5862"><span class="lineNum"> 5862 </span> : : * the substring of @a __str, 0 if their values are equivalent,</a>
|
||
|
<a name="5863"><span class="lineNum"> 5863 </span> : : * or > 0 if this substring is ordered after the substring of</a>
|
||
|
<a name="5864"><span class="lineNum"> 5864 </span> : : * @a __str. Determines the effective length rlen of the</a>
|
||
|
<a name="5865"><span class="lineNum"> 5865 </span> : : * strings to compare as the smallest of the lengths of the</a>
|
||
|
<a name="5866"><span class="lineNum"> 5866 </span> : : * substrings. The function then compares the two strings by</a>
|
||
|
<a name="5867"><span class="lineNum"> 5867 </span> : : * calling</a>
|
||
|
<a name="5868"><span class="lineNum"> 5868 </span> : : * traits::compare(substring.data(),str.substr(pos2,n2).data(),rlen).</a>
|
||
|
<a name="5869"><span class="lineNum"> 5869 </span> : : * If the result of the comparison is nonzero returns it,</a>
|
||
|
<a name="5870"><span class="lineNum"> 5870 </span> : : * otherwise the shorter one is ordered first.</a>
|
||
|
<a name="5871"><span class="lineNum"> 5871 </span> : : */</a>
|
||
|
<a name="5872"><span class="lineNum"> 5872 </span> : : int</a>
|
||
|
<a name="5873"><span class="lineNum"> 5873 </span> : : compare(size_type __pos1, size_type __n1, const basic_string& __str,</a>
|
||
|
<a name="5874"><span class="lineNum"> 5874 </span> : : size_type __pos2, size_type __n2 = npos) const;</a>
|
||
|
<a name="5875"><span class="lineNum"> 5875 </span> : : </a>
|
||
|
<a name="5876"><span class="lineNum"> 5876 </span> : : /**</a>
|
||
|
<a name="5877"><span class="lineNum"> 5877 </span> : : * @brief Compare to a C string.</a>
|
||
|
<a name="5878"><span class="lineNum"> 5878 </span> : : * @param __s C string to compare against.</a>
|
||
|
<a name="5879"><span class="lineNum"> 5879 </span> : : * @return Integer < 0, 0, or > 0.</a>
|
||
|
<a name="5880"><span class="lineNum"> 5880 </span> : : *</a>
|
||
|
<a name="5881"><span class="lineNum"> 5881 </span> : : * Returns an integer < 0 if this string is ordered before @a __s, 0 if</a>
|
||
|
<a name="5882"><span class="lineNum"> 5882 </span> : : * their values are equivalent, or > 0 if this string is ordered after</a>
|
||
|
<a name="5883"><span class="lineNum"> 5883 </span> : : * @a __s. Determines the effective length rlen of the strings to</a>
|
||
|
<a name="5884"><span class="lineNum"> 5884 </span> : : * compare as the smallest of size() and the length of a string</a>
|
||
|
<a name="5885"><span class="lineNum"> 5885 </span> : : * constructed from @a __s. The function then compares the two strings</a>
|
||
|
<a name="5886"><span class="lineNum"> 5886 </span> : : * by calling traits::compare(data(),s,rlen). If the result of the</a>
|
||
|
<a name="5887"><span class="lineNum"> 5887 </span> : : * comparison is nonzero returns it, otherwise the shorter one is</a>
|
||
|
<a name="5888"><span class="lineNum"> 5888 </span> : : * ordered first.</a>
|
||
|
<a name="5889"><span class="lineNum"> 5889 </span> : : */</a>
|
||
|
<a name="5890"><span class="lineNum"> 5890 </span> : : int</a>
|
||
|
<a name="5891"><span class="lineNum"> 5891 </span> : : compare(const _CharT* __s) const _GLIBCXX_NOEXCEPT;</a>
|
||
|
<a name="5892"><span class="lineNum"> 5892 </span> : : </a>
|
||
|
<a name="5893"><span class="lineNum"> 5893 </span> : : // _GLIBCXX_RESOLVE_LIB_DEFECTS</a>
|
||
|
<a name="5894"><span class="lineNum"> 5894 </span> : : // 5 String::compare specification questionable</a>
|
||
|
<a name="5895"><span class="lineNum"> 5895 </span> : : /**</a>
|
||
|
<a name="5896"><span class="lineNum"> 5896 </span> : : * @brief Compare substring to a C string.</a>
|
||
|
<a name="5897"><span class="lineNum"> 5897 </span> : : * @param __pos Index of first character of substring.</a>
|
||
|
<a name="5898"><span class="lineNum"> 5898 </span> : : * @param __n1 Number of characters in substring.</a>
|
||
|
<a name="5899"><span class="lineNum"> 5899 </span> : : * @param __s C string to compare against.</a>
|
||
|
<a name="5900"><span class="lineNum"> 5900 </span> : : * @return Integer < 0, 0, or > 0.</a>
|
||
|
<a name="5901"><span class="lineNum"> 5901 </span> : : *</a>
|
||
|
<a name="5902"><span class="lineNum"> 5902 </span> : : * Form the substring of this string from the @a __n1</a>
|
||
|
<a name="5903"><span class="lineNum"> 5903 </span> : : * characters starting at @a pos. Returns an integer < 0 if</a>
|
||
|
<a name="5904"><span class="lineNum"> 5904 </span> : : * the substring is ordered before @a __s, 0 if their values</a>
|
||
|
<a name="5905"><span class="lineNum"> 5905 </span> : : * are equivalent, or > 0 if the substring is ordered after @a</a>
|
||
|
<a name="5906"><span class="lineNum"> 5906 </span> : : * __s. Determines the effective length rlen of the strings to</a>
|
||
|
<a name="5907"><span class="lineNum"> 5907 </span> : : * compare as the smallest of the length of the substring and</a>
|
||
|
<a name="5908"><span class="lineNum"> 5908 </span> : : * the length of a string constructed from @a __s. The</a>
|
||
|
<a name="5909"><span class="lineNum"> 5909 </span> : : * function then compares the two string by calling</a>
|
||
|
<a name="5910"><span class="lineNum"> 5910 </span> : : * traits::compare(substring.data(),__s,rlen). If the result of</a>
|
||
|
<a name="5911"><span class="lineNum"> 5911 </span> : : * the comparison is nonzero returns it, otherwise the shorter</a>
|
||
|
<a name="5912"><span class="lineNum"> 5912 </span> : : * one is ordered first.</a>
|
||
|
<a name="5913"><span class="lineNum"> 5913 </span> : : */</a>
|
||
|
<a name="5914"><span class="lineNum"> 5914 </span> : : int</a>
|
||
|
<a name="5915"><span class="lineNum"> 5915 </span> : : compare(size_type __pos, size_type __n1, const _CharT* __s) const;</a>
|
||
|
<a name="5916"><span class="lineNum"> 5916 </span> : : </a>
|
||
|
<a name="5917"><span class="lineNum"> 5917 </span> : : /**</a>
|
||
|
<a name="5918"><span class="lineNum"> 5918 </span> : : * @brief Compare substring against a character %array.</a>
|
||
|
<a name="5919"><span class="lineNum"> 5919 </span> : : * @param __pos Index of first character of substring.</a>
|
||
|
<a name="5920"><span class="lineNum"> 5920 </span> : : * @param __n1 Number of characters in substring.</a>
|
||
|
<a name="5921"><span class="lineNum"> 5921 </span> : : * @param __s character %array to compare against.</a>
|
||
|
<a name="5922"><span class="lineNum"> 5922 </span> : : * @param __n2 Number of characters of s.</a>
|
||
|
<a name="5923"><span class="lineNum"> 5923 </span> : : * @return Integer < 0, 0, or > 0.</a>
|
||
|
<a name="5924"><span class="lineNum"> 5924 </span> : : *</a>
|
||
|
<a name="5925"><span class="lineNum"> 5925 </span> : : * Form the substring of this string from the @a __n1</a>
|
||
|
<a name="5926"><span class="lineNum"> 5926 </span> : : * characters starting at @a __pos. Form a string from the</a>
|
||
|
<a name="5927"><span class="lineNum"> 5927 </span> : : * first @a __n2 characters of @a __s. Returns an integer < 0</a>
|
||
|
<a name="5928"><span class="lineNum"> 5928 </span> : : * if this substring is ordered before the string from @a __s,</a>
|
||
|
<a name="5929"><span class="lineNum"> 5929 </span> : : * 0 if their values are equivalent, or > 0 if this substring</a>
|
||
|
<a name="5930"><span class="lineNum"> 5930 </span> : : * is ordered after the string from @a __s. Determines the</a>
|
||
|
<a name="5931"><span class="lineNum"> 5931 </span> : : * effective length rlen of the strings to compare as the</a>
|
||
|
<a name="5932"><span class="lineNum"> 5932 </span> : : * smallest of the length of the substring and @a __n2. The</a>
|
||
|
<a name="5933"><span class="lineNum"> 5933 </span> : : * function then compares the two strings by calling</a>
|
||
|
<a name="5934"><span class="lineNum"> 5934 </span> : : * traits::compare(substring.data(),s,rlen). If the result of</a>
|
||
|
<a name="5935"><span class="lineNum"> 5935 </span> : : * the comparison is nonzero returns it, otherwise the shorter</a>
|
||
|
<a name="5936"><span class="lineNum"> 5936 </span> : : * one is ordered first.</a>
|
||
|
<a name="5937"><span class="lineNum"> 5937 </span> : : *</a>
|
||
|
<a name="5938"><span class="lineNum"> 5938 </span> : : * NB: s must have at least n2 characters, &apos;\\0&apos; has</a>
|
||
|
<a name="5939"><span class="lineNum"> 5939 </span> : : * no special meaning.</a>
|
||
|
<a name="5940"><span class="lineNum"> 5940 </span> : : */</a>
|
||
|
<a name="5941"><span class="lineNum"> 5941 </span> : : int</a>
|
||
|
<a name="5942"><span class="lineNum"> 5942 </span> : : compare(size_type __pos, size_type __n1, const _CharT* __s,</a>
|
||
|
<a name="5943"><span class="lineNum"> 5943 </span> : : size_type __n2) const;</a>
|
||
|
<a name="5944"><span class="lineNum"> 5944 </span> : : </a>
|
||
|
<a name="5945"><span class="lineNum"> 5945 </span> : : #if __cplusplus > 201703L</a>
|
||
|
<a name="5946"><span class="lineNum"> 5946 </span> : : bool</a>
|
||
|
<a name="5947"><span class="lineNum"> 5947 </span> : : starts_with(basic_string_view<_CharT, _Traits> __x) const noexcept</a>
|
||
|
<a name="5948"><span class="lineNum"> 5948 </span> : : { return __sv_type(this->data(), this->size()).starts_with(__x); }</a>
|
||
|
<a name="5949"><span class="lineNum"> 5949 </span> : : </a>
|
||
|
<a name="5950"><span class="lineNum"> 5950 </span> : : bool</a>
|
||
|
<a name="5951"><span class="lineNum"> 5951 </span> : : starts_with(_CharT __x) const noexcept</a>
|
||
|
<a name="5952"><span class="lineNum"> 5952 </span> : : { return __sv_type(this->data(), this->size()).starts_with(__x); }</a>
|
||
|
<a name="5953"><span class="lineNum"> 5953 </span> : : </a>
|
||
|
<a name="5954"><span class="lineNum"> 5954 </span> : : bool</a>
|
||
|
<a name="5955"><span class="lineNum"> 5955 </span> : : starts_with(const _CharT* __x) const noexcept</a>
|
||
|
<a name="5956"><span class="lineNum"> 5956 </span> : : { return __sv_type(this->data(), this->size()).starts_with(__x); }</a>
|
||
|
<a name="5957"><span class="lineNum"> 5957 </span> : : </a>
|
||
|
<a name="5958"><span class="lineNum"> 5958 </span> : : bool</a>
|
||
|
<a name="5959"><span class="lineNum"> 5959 </span> : : ends_with(basic_string_view<_CharT, _Traits> __x) const noexcept</a>
|
||
|
<a name="5960"><span class="lineNum"> 5960 </span> : : { return __sv_type(this->data(), this->size()).ends_with(__x); }</a>
|
||
|
<a name="5961"><span class="lineNum"> 5961 </span> : : </a>
|
||
|
<a name="5962"><span class="lineNum"> 5962 </span> : : bool</a>
|
||
|
<a name="5963"><span class="lineNum"> 5963 </span> : : ends_with(_CharT __x) const noexcept</a>
|
||
|
<a name="5964"><span class="lineNum"> 5964 </span> : : { return __sv_type(this->data(), this->size()).ends_with(__x); }</a>
|
||
|
<a name="5965"><span class="lineNum"> 5965 </span> : : </a>
|
||
|
<a name="5966"><span class="lineNum"> 5966 </span> : : bool</a>
|
||
|
<a name="5967"><span class="lineNum"> 5967 </span> : : ends_with(const _CharT* __x) const noexcept</a>
|
||
|
<a name="5968"><span class="lineNum"> 5968 </span> : : { return __sv_type(this->data(), this->size()).ends_with(__x); }</a>
|
||
|
<a name="5969"><span class="lineNum"> 5969 </span> : : #endif // C++20</a>
|
||
|
<a name="5970"><span class="lineNum"> 5970 </span> : : </a>
|
||
|
<a name="5971"><span class="lineNum"> 5971 </span> : : # ifdef _GLIBCXX_TM_TS_INTERNAL</a>
|
||
|
<a name="5972"><span class="lineNum"> 5972 </span> : : friend void</a>
|
||
|
<a name="5973"><span class="lineNum"> 5973 </span> : : ::_txnal_cow_string_C1_for_exceptions(void* that, const char* s,</a>
|
||
|
<a name="5974"><span class="lineNum"> 5974 </span> : : void* exc);</a>
|
||
|
<a name="5975"><span class="lineNum"> 5975 </span> : : friend const char*</a>
|
||
|
<a name="5976"><span class="lineNum"> 5976 </span> : : ::_txnal_cow_string_c_str(const void *that);</a>
|
||
|
<a name="5977"><span class="lineNum"> 5977 </span> : : friend void</a>
|
||
|
<a name="5978"><span class="lineNum"> 5978 </span> : : ::_txnal_cow_string_D1(void *that);</a>
|
||
|
<a name="5979"><span class="lineNum"> 5979 </span> : : friend void</a>
|
||
|
<a name="5980"><span class="lineNum"> 5980 </span> : : ::_txnal_cow_string_D1_commit(void *that);</a>
|
||
|
<a name="5981"><span class="lineNum"> 5981 </span> : : # endif</a>
|
||
|
<a name="5982"><span class="lineNum"> 5982 </span> : : };</a>
|
||
|
<a name="5983"><span class="lineNum"> 5983 </span> : : #endif // !_GLIBCXX_USE_CXX11_ABI</a>
|
||
|
<a name="5984"><span class="lineNum"> 5984 </span> : : </a>
|
||
|
<a name="5985"><span class="lineNum"> 5985 </span> : : #if __cpp_deduction_guides >= 201606</a>
|
||
|
<a name="5986"><span class="lineNum"> 5986 </span> : : _GLIBCXX_BEGIN_NAMESPACE_CXX11</a>
|
||
|
<a name="5987"><span class="lineNum"> 5987 </span> : : template<typename _InputIterator, typename _CharT</a>
|
||
|
<a name="5988"><span class="lineNum"> 5988 </span> : : = typename iterator_traits<_InputIterator>::value_type,</a>
|
||
|
<a name="5989"><span class="lineNum"> 5989 </span> : : typename _Allocator = allocator<_CharT>,</a>
|
||
|
<a name="5990"><span class="lineNum"> 5990 </span> : : typename = _RequireInputIter<_InputIterator>,</a>
|
||
|
<a name="5991"><span class="lineNum"> 5991 </span> : : typename = _RequireAllocator<_Allocator>></a>
|
||
|
<a name="5992"><span class="lineNum"> 5992 </span> : : basic_string(_InputIterator, _InputIterator, _Allocator = _Allocator())</a>
|
||
|
<a name="5993"><span class="lineNum"> 5993 </span> : : -> basic_string<_CharT, char_traits<_CharT>, _Allocator>;</a>
|
||
|
<a name="5994"><span class="lineNum"> 5994 </span> : : </a>
|
||
|
<a name="5995"><span class="lineNum"> 5995 </span> : : // _GLIBCXX_RESOLVE_LIB_DEFECTS</a>
|
||
|
<a name="5996"><span class="lineNum"> 5996 </span> : : // 3075. basic_string needs deduction guides from basic_string_view</a>
|
||
|
<a name="5997"><span class="lineNum"> 5997 </span> : : template<typename _CharT, typename _Traits,</a>
|
||
|
<a name="5998"><span class="lineNum"> 5998 </span> : : typename _Allocator = allocator<_CharT>,</a>
|
||
|
<a name="5999"><span class="lineNum"> 5999 </span> : : typename = _RequireAllocator<_Allocator>></a>
|
||
|
<a name="6000"><span class="lineNum"> 6000 </span> : : basic_string(basic_string_view<_CharT, _Traits>, const _Allocator& = _Allocator())</a>
|
||
|
<a name="6001"><span class="lineNum"> 6001 </span> : : -> basic_string<_CharT, _Traits, _Allocator>;</a>
|
||
|
<a name="6002"><span class="lineNum"> 6002 </span> : : </a>
|
||
|
<a name="6003"><span class="lineNum"> 6003 </span> : : template<typename _CharT, typename _Traits,</a>
|
||
|
<a name="6004"><span class="lineNum"> 6004 </span> : : typename _Allocator = allocator<_CharT>,</a>
|
||
|
<a name="6005"><span class="lineNum"> 6005 </span> : : typename = _RequireAllocator<_Allocator>></a>
|
||
|
<a name="6006"><span class="lineNum"> 6006 </span> : : basic_string(basic_string_view<_CharT, _Traits>,</a>
|
||
|
<a name="6007"><span class="lineNum"> 6007 </span> : : typename basic_string<_CharT, _Traits, _Allocator>::size_type,</a>
|
||
|
<a name="6008"><span class="lineNum"> 6008 </span> : : typename basic_string<_CharT, _Traits, _Allocator>::size_type,</a>
|
||
|
<a name="6009"><span class="lineNum"> 6009 </span> : : const _Allocator& = _Allocator())</a>
|
||
|
<a name="6010"><span class="lineNum"> 6010 </span> : : -> basic_string<_CharT, _Traits, _Allocator>;</a>
|
||
|
<a name="6011"><span class="lineNum"> 6011 </span> : : _GLIBCXX_END_NAMESPACE_CXX11</a>
|
||
|
<a name="6012"><span class="lineNum"> 6012 </span> : : #endif</a>
|
||
|
<a name="6013"><span class="lineNum"> 6013 </span> : : </a>
|
||
|
<a name="6014"><span class="lineNum"> 6014 </span> : : // operator+</a>
|
||
|
<a name="6015"><span class="lineNum"> 6015 </span> : : /**</a>
|
||
|
<a name="6016"><span class="lineNum"> 6016 </span> : : * @brief Concatenate two strings.</a>
|
||
|
<a name="6017"><span class="lineNum"> 6017 </span> : : * @param __lhs First string.</a>
|
||
|
<a name="6018"><span class="lineNum"> 6018 </span> : : * @param __rhs Last string.</a>
|
||
|
<a name="6019"><span class="lineNum"> 6019 </span> : : * @return New string with value of @a __lhs followed by @a __rhs.</a>
|
||
|
<a name="6020"><span class="lineNum"> 6020 </span> : : */</a>
|
||
|
<a name="6021"><span class="lineNum"> 6021 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6022"><span class="lineNum"> 6022 </span> : : basic_string<_CharT, _Traits, _Alloc></a>
|
||
|
<a name="6023"><span class="lineNum"> 6023 </span> : : operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,</a>
|
||
|
<a name="6024"><span class="lineNum"> 6024 </span> : : const basic_string<_CharT, _Traits, _Alloc>& __rhs)</a>
|
||
|
<a name="6025"><span class="lineNum"> 6025 </span> : : {</a>
|
||
|
<a name="6026"><span class="lineNum"> 6026 </span> : : basic_string<_CharT, _Traits, _Alloc> __str(__lhs);</a>
|
||
|
<a name="6027"><span class="lineNum"> 6027 </span> : : __str.append(__rhs);</a>
|
||
|
<a name="6028"><span class="lineNum"> 6028 </span> : : return __str;</a>
|
||
|
<a name="6029"><span class="lineNum"> 6029 </span> : : }</a>
|
||
|
<a name="6030"><span class="lineNum"> 6030 </span> : : </a>
|
||
|
<a name="6031"><span class="lineNum"> 6031 </span> : : /**</a>
|
||
|
<a name="6032"><span class="lineNum"> 6032 </span> : : * @brief Concatenate C string and string.</a>
|
||
|
<a name="6033"><span class="lineNum"> 6033 </span> : : * @param __lhs First string.</a>
|
||
|
<a name="6034"><span class="lineNum"> 6034 </span> : : * @param __rhs Last string.</a>
|
||
|
<a name="6035"><span class="lineNum"> 6035 </span> : : * @return New string with value of @a __lhs followed by @a __rhs.</a>
|
||
|
<a name="6036"><span class="lineNum"> 6036 </span> : : */</a>
|
||
|
<a name="6037"><span class="lineNum"> 6037 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6038"><span class="lineNum"> 6038 </span> : : basic_string<_CharT,_Traits,_Alloc></a>
|
||
|
<a name="6039"><span class="lineNum"> 6039 </span> : : operator+(const _CharT* __lhs,</a>
|
||
|
<a name="6040"><span class="lineNum"> 6040 </span> : : const basic_string<_CharT,_Traits,_Alloc>& __rhs);</a>
|
||
|
<a name="6041"><span class="lineNum"> 6041 </span> : : </a>
|
||
|
<a name="6042"><span class="lineNum"> 6042 </span> : : /**</a>
|
||
|
<a name="6043"><span class="lineNum"> 6043 </span> : : * @brief Concatenate character and string.</a>
|
||
|
<a name="6044"><span class="lineNum"> 6044 </span> : : * @param __lhs First string.</a>
|
||
|
<a name="6045"><span class="lineNum"> 6045 </span> : : * @param __rhs Last string.</a>
|
||
|
<a name="6046"><span class="lineNum"> 6046 </span> : : * @return New string with @a __lhs followed by @a __rhs.</a>
|
||
|
<a name="6047"><span class="lineNum"> 6047 </span> : : */</a>
|
||
|
<a name="6048"><span class="lineNum"> 6048 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6049"><span class="lineNum"> 6049 </span> : : basic_string<_CharT,_Traits,_Alloc></a>
|
||
|
<a name="6050"><span class="lineNum"> 6050 </span> : : operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs);</a>
|
||
|
<a name="6051"><span class="lineNum"> 6051 </span> : : </a>
|
||
|
<a name="6052"><span class="lineNum"> 6052 </span> : : /**</a>
|
||
|
<a name="6053"><span class="lineNum"> 6053 </span> : : * @brief Concatenate string and C string.</a>
|
||
|
<a name="6054"><span class="lineNum"> 6054 </span> : : * @param __lhs First string.</a>
|
||
|
<a name="6055"><span class="lineNum"> 6055 </span> : : * @param __rhs Last string.</a>
|
||
|
<a name="6056"><span class="lineNum"> 6056 </span> : : * @return New string with @a __lhs followed by @a __rhs.</a>
|
||
|
<a name="6057"><span class="lineNum"> 6057 </span> : : */</a>
|
||
|
<a name="6058"><span class="lineNum"> 6058 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6059"><span class="lineNum"> 6059 </span> : : inline basic_string<_CharT, _Traits, _Alloc></a>
|
||
|
<a name="6060"><span class="lineNum"> 6060 </span> : : operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,</a>
|
||
|
<a name="6061"><span class="lineNum"> 6061 </span> : : const _CharT* __rhs)</a>
|
||
|
<a name="6062"><span class="lineNum"> 6062 </span> : : {</a>
|
||
|
<a name="6063"><span class="lineNum"> 6063 </span> : : basic_string<_CharT, _Traits, _Alloc> __str(__lhs);</a>
|
||
|
<a name="6064"><span class="lineNum"> 6064 </span> : : __str.append(__rhs);</a>
|
||
|
<a name="6065"><span class="lineNum"> 6065 </span> : : return __str;</a>
|
||
|
<a name="6066"><span class="lineNum"> 6066 </span> : : }</a>
|
||
|
<a name="6067"><span class="lineNum"> 6067 </span> : : </a>
|
||
|
<a name="6068"><span class="lineNum"> 6068 </span> : : /**</a>
|
||
|
<a name="6069"><span class="lineNum"> 6069 </span> : : * @brief Concatenate string and character.</a>
|
||
|
<a name="6070"><span class="lineNum"> 6070 </span> : : * @param __lhs First string.</a>
|
||
|
<a name="6071"><span class="lineNum"> 6071 </span> : : * @param __rhs Last string.</a>
|
||
|
<a name="6072"><span class="lineNum"> 6072 </span> : : * @return New string with @a __lhs followed by @a __rhs.</a>
|
||
|
<a name="6073"><span class="lineNum"> 6073 </span> : : */</a>
|
||
|
<a name="6074"><span class="lineNum"> 6074 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6075"><span class="lineNum"> 6075 </span> : : inline basic_string<_CharT, _Traits, _Alloc></a>
|
||
|
<a name="6076"><span class="lineNum"> 6076 </span> : : operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)</a>
|
||
|
<a name="6077"><span class="lineNum"> 6077 </span> : : {</a>
|
||
|
<a name="6078"><span class="lineNum"> 6078 </span> : : typedef basic_string<_CharT, _Traits, _Alloc> __string_type;</a>
|
||
|
<a name="6079"><span class="lineNum"> 6079 </span> : : typedef typename __string_type::size_type __size_type;</a>
|
||
|
<a name="6080"><span class="lineNum"> 6080 </span> : : __string_type __str(__lhs);</a>
|
||
|
<a name="6081"><span class="lineNum"> 6081 </span> : : __str.append(__size_type(1), __rhs);</a>
|
||
|
<a name="6082"><span class="lineNum"> 6082 </span> : : return __str;</a>
|
||
|
<a name="6083"><span class="lineNum"> 6083 </span> : : }</a>
|
||
|
<a name="6084"><span class="lineNum"> 6084 </span> : : </a>
|
||
|
<a name="6085"><span class="lineNum"> 6085 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="6086"><span class="lineNum"> 6086 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6087"><span class="lineNum"> 6087 </span> : : inline basic_string<_CharT, _Traits, _Alloc></a>
|
||
|
<a name="6088"><span class="lineNum"> 6088 </span> : : operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,</a>
|
||
|
<a name="6089"><span class="lineNum"> 6089 </span> : : const basic_string<_CharT, _Traits, _Alloc>& __rhs)</a>
|
||
|
<a name="6090"><span class="lineNum"> 6090 </span> : : { return std::move(__lhs.append(__rhs)); }</a>
|
||
|
<a name="6091"><span class="lineNum"> 6091 </span> : : </a>
|
||
|
<a name="6092"><span class="lineNum"> 6092 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6093"><span class="lineNum"> 6093 </span> : : inline basic_string<_CharT, _Traits, _Alloc></a>
|
||
|
<a name="6094"><span class="lineNum"> 6094 </span> : : operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,</a>
|
||
|
<a name="6095"><span class="lineNum"> 6095 </span> : : basic_string<_CharT, _Traits, _Alloc>&& __rhs)</a>
|
||
|
<a name="6096"><span class="lineNum"> 6096 </span> : : { return std::move(__rhs.insert(0, __lhs)); }</a>
|
||
|
<a name="6097"><span class="lineNum"> 6097 </span> : : </a>
|
||
|
<a name="6098"><span class="lineNum"> 6098 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6099"><span class="lineNum"> 6099 </span> : : inline basic_string<_CharT, _Traits, _Alloc></a>
|
||
|
<a name="6100"><span class="lineNum"> 6100 </span> : : operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,</a>
|
||
|
<a name="6101"><span class="lineNum"> 6101 </span> : : basic_string<_CharT, _Traits, _Alloc>&& __rhs)</a>
|
||
|
<a name="6102"><span class="lineNum"> 6102 </span> : : {</a>
|
||
|
<a name="6103"><span class="lineNum"> 6103 </span> : : const auto __size = __lhs.size() + __rhs.size();</a>
|
||
|
<a name="6104"><span class="lineNum"> 6104 </span> : : const bool __cond = (__size > __lhs.capacity()</a>
|
||
|
<a name="6105"><span class="lineNum"> 6105 </span> : : && __size <= __rhs.capacity());</a>
|
||
|
<a name="6106"><span class="lineNum"> 6106 </span> : : return __cond ? std::move(__rhs.insert(0, __lhs))</a>
|
||
|
<a name="6107"><span class="lineNum"> 6107 </span> : : : std::move(__lhs.append(__rhs));</a>
|
||
|
<a name="6108"><span class="lineNum"> 6108 </span> : : }</a>
|
||
|
<a name="6109"><span class="lineNum"> 6109 </span> : : </a>
|
||
|
<a name="6110"><span class="lineNum"> 6110 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6111"><span class="lineNum"> 6111 </span> : : inline basic_string<_CharT, _Traits, _Alloc></a>
|
||
|
<a name="6112"><span class="lineNum"> 6112 </span> : : operator+(const _CharT* __lhs,</a>
|
||
|
<a name="6113"><span class="lineNum"> 6113 </span> : : basic_string<_CharT, _Traits, _Alloc>&& __rhs)</a>
|
||
|
<a name="6114"><span class="lineNum"> 6114 </span> : : { return std::move(__rhs.insert(0, __lhs)); }</a>
|
||
|
<a name="6115"><span class="lineNum"> 6115 </span> : : </a>
|
||
|
<a name="6116"><span class="lineNum"> 6116 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6117"><span class="lineNum"> 6117 </span> : : inline basic_string<_CharT, _Traits, _Alloc></a>
|
||
|
<a name="6118"><span class="lineNum"> 6118 </span> : : operator+(_CharT __lhs,</a>
|
||
|
<a name="6119"><span class="lineNum"> 6119 </span> : : basic_string<_CharT, _Traits, _Alloc>&& __rhs)</a>
|
||
|
<a name="6120"><span class="lineNum"> 6120 </span> : : { return std::move(__rhs.insert(0, 1, __lhs)); }</a>
|
||
|
<a name="6121"><span class="lineNum"> 6121 </span> : : </a>
|
||
|
<a name="6122"><span class="lineNum"> 6122 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6123"><span class="lineNum"> 6123 </span> : : inline basic_string<_CharT, _Traits, _Alloc></a>
|
||
|
<a name="6124"><span class="lineNum"> 6124 </span> : : operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,</a>
|
||
|
<a name="6125"><span class="lineNum"> 6125 </span> : : const _CharT* __rhs)</a>
|
||
|
<a name="6126"><span class="lineNum"> 6126 </span> : : { return std::move(__lhs.append(__rhs)); }</a>
|
||
|
<a name="6127"><span class="lineNum"> 6127 </span> : : </a>
|
||
|
<a name="6128"><span class="lineNum"> 6128 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6129"><span class="lineNum"> 6129 </span> : : inline basic_string<_CharT, _Traits, _Alloc></a>
|
||
|
<a name="6130"><span class="lineNum"> 6130 </span> : : operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,</a>
|
||
|
<a name="6131"><span class="lineNum"> 6131 </span> : : _CharT __rhs)</a>
|
||
|
<a name="6132"><span class="lineNum"> 6132 </span> : : { return std::move(__lhs.append(1, __rhs)); }</a>
|
||
|
<a name="6133"><span class="lineNum"> 6133 </span> : : #endif</a>
|
||
|
<a name="6134"><span class="lineNum"> 6134 </span> : : </a>
|
||
|
<a name="6135"><span class="lineNum"> 6135 </span> : : // operator ==</a>
|
||
|
<a name="6136"><span class="lineNum"> 6136 </span> : : /**</a>
|
||
|
<a name="6137"><span class="lineNum"> 6137 </span> : : * @brief Test equivalence of two strings.</a>
|
||
|
<a name="6138"><span class="lineNum"> 6138 </span> : : * @param __lhs First string.</a>
|
||
|
<a name="6139"><span class="lineNum"> 6139 </span> : : * @param __rhs Second string.</a>
|
||
|
<a name="6140"><span class="lineNum"> 6140 </span> : : * @return True if @a __lhs.compare(@a __rhs) == 0. False otherwise.</a>
|
||
|
<a name="6141"><span class="lineNum"> 6141 </span> : : */</a>
|
||
|
<a name="6142"><span class="lineNum"> 6142 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6143"><span class="lineNum"> 6143 </span> : : inline bool</a>
|
||
|
<a name="6144"><span class="lineNum"> 6144 </span> : : operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,</a>
|
||
|
<a name="6145"><span class="lineNum"> 6145 </span> : : const basic_string<_CharT, _Traits, _Alloc>& __rhs)</a>
|
||
|
<a name="6146"><span class="lineNum"> 6146 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="6147"><span class="lineNum"> 6147 </span> : : { return __lhs.compare(__rhs) == 0; }</a>
|
||
|
<a name="6148"><span class="lineNum"> 6148 </span> : : </a>
|
||
|
<a name="6149"><span class="lineNum"> 6149 </span> : : template<typename _CharT></a>
|
||
|
<a name="6150"><span class="lineNum"> 6150 </span> : : inline</a>
|
||
|
<a name="6151"><span class="lineNum"> 6151 </span> : : typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, bool>::__type</a>
|
||
|
<a name="6152"><span class="lineNum"> 6152 </span> : : operator==(const basic_string<_CharT>& __lhs,</a>
|
||
|
<a name="6153"><span class="lineNum"> 6153 </span> : : const basic_string<_CharT>& __rhs) _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="6154"><span class="lineNum"> 6154 </span> : : { return (__lhs.size() == __rhs.size()</a>
|
||
|
<a name="6155"><span class="lineNum"> 6155 </span> : : && !std::char_traits<_CharT>::compare(__lhs.data(), __rhs.data(),</a>
|
||
|
<a name="6156"><span class="lineNum"> 6156 </span> : : __lhs.size())); }</a>
|
||
|
<a name="6157"><span class="lineNum"> 6157 </span> : : </a>
|
||
|
<a name="6158"><span class="lineNum"> 6158 </span> : : /**</a>
|
||
|
<a name="6159"><span class="lineNum"> 6159 </span> : : * @brief Test equivalence of C string and string.</a>
|
||
|
<a name="6160"><span class="lineNum"> 6160 </span> : : * @param __lhs C string.</a>
|
||
|
<a name="6161"><span class="lineNum"> 6161 </span> : : * @param __rhs String.</a>
|
||
|
<a name="6162"><span class="lineNum"> 6162 </span> : : * @return True if @a __rhs.compare(@a __lhs) == 0. False otherwise.</a>
|
||
|
<a name="6163"><span class="lineNum"> 6163 </span> : : */</a>
|
||
|
<a name="6164"><span class="lineNum"> 6164 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6165"><span class="lineNum"> 6165 </span> : : inline bool</a>
|
||
|
<a name="6166"><span class="lineNum"> 6166 </span> : : operator==(const _CharT* __lhs,</a>
|
||
|
<a name="6167"><span class="lineNum"> 6167 </span> : : const basic_string<_CharT, _Traits, _Alloc>& __rhs)</a>
|
||
|
<a name="6168"><span class="lineNum"> 6168 </span> : : { return __rhs.compare(__lhs) == 0; }</a>
|
||
|
<a name="6169"><span class="lineNum"> 6169 </span> : : </a>
|
||
|
<a name="6170"><span class="lineNum"> 6170 </span> : : /**</a>
|
||
|
<a name="6171"><span class="lineNum"> 6171 </span> : : * @brief Test equivalence of string and C string.</a>
|
||
|
<a name="6172"><span class="lineNum"> 6172 </span> : : * @param __lhs String.</a>
|
||
|
<a name="6173"><span class="lineNum"> 6173 </span> : : * @param __rhs C string.</a>
|
||
|
<a name="6174"><span class="lineNum"> 6174 </span> : : * @return True if @a __lhs.compare(@a __rhs) == 0. False otherwise.</a>
|
||
|
<a name="6175"><span class="lineNum"> 6175 </span> : : */</a>
|
||
|
<a name="6176"><span class="lineNum"> 6176 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6177"><span class="lineNum"> 6177 </span> : : inline bool</a>
|
||
|
<a name="6178"><span class="lineNum"> 6178 </span> : : operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,</a>
|
||
|
<a name="6179"><span class="lineNum"> 6179 </span> : : const _CharT* __rhs)</a>
|
||
|
<a name="6180"><span class="lineNum"> 6180 </span> : : { return __lhs.compare(__rhs) == 0; }</a>
|
||
|
<a name="6181"><span class="lineNum"> 6181 </span> : : </a>
|
||
|
<a name="6182"><span class="lineNum"> 6182 </span> : : // operator !=</a>
|
||
|
<a name="6183"><span class="lineNum"> 6183 </span> : : /**</a>
|
||
|
<a name="6184"><span class="lineNum"> 6184 </span> : : * @brief Test difference of two strings.</a>
|
||
|
<a name="6185"><span class="lineNum"> 6185 </span> : : * @param __lhs First string.</a>
|
||
|
<a name="6186"><span class="lineNum"> 6186 </span> : : * @param __rhs Second string.</a>
|
||
|
<a name="6187"><span class="lineNum"> 6187 </span> : : * @return True if @a __lhs.compare(@a __rhs) != 0. False otherwise.</a>
|
||
|
<a name="6188"><span class="lineNum"> 6188 </span> : : */</a>
|
||
|
<a name="6189"><span class="lineNum"> 6189 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6190"><span class="lineNum"> 6190 </span> : : inline bool</a>
|
||
|
<a name="6191"><span class="lineNum"> 6191 </span> : : operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,</a>
|
||
|
<a name="6192"><span class="lineNum"> 6192 </span> : : const basic_string<_CharT, _Traits, _Alloc>& __rhs)</a>
|
||
|
<a name="6193"><span class="lineNum"> 6193 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="6194"><span class="lineNum"> 6194 </span> : : { return !(__lhs == __rhs); }</a>
|
||
|
<a name="6195"><span class="lineNum"> 6195 </span> : : </a>
|
||
|
<a name="6196"><span class="lineNum"> 6196 </span> : : /**</a>
|
||
|
<a name="6197"><span class="lineNum"> 6197 </span> : : * @brief Test difference of C string and string.</a>
|
||
|
<a name="6198"><span class="lineNum"> 6198 </span> : : * @param __lhs C string.</a>
|
||
|
<a name="6199"><span class="lineNum"> 6199 </span> : : * @param __rhs String.</a>
|
||
|
<a name="6200"><span class="lineNum"> 6200 </span> : : * @return True if @a __rhs.compare(@a __lhs) != 0. False otherwise.</a>
|
||
|
<a name="6201"><span class="lineNum"> 6201 </span> : : */</a>
|
||
|
<a name="6202"><span class="lineNum"> 6202 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6203"><span class="lineNum"> 6203 </span> : : inline bool</a>
|
||
|
<a name="6204"><span class="lineNum"> 6204 </span> : : operator!=(const _CharT* __lhs,</a>
|
||
|
<a name="6205"><span class="lineNum"> 6205 </span> : : const basic_string<_CharT, _Traits, _Alloc>& __rhs)</a>
|
||
|
<a name="6206"><span class="lineNum"> 6206 </span> : : { return !(__lhs == __rhs); }</a>
|
||
|
<a name="6207"><span class="lineNum"> 6207 </span> : : </a>
|
||
|
<a name="6208"><span class="lineNum"> 6208 </span> : : /**</a>
|
||
|
<a name="6209"><span class="lineNum"> 6209 </span> : : * @brief Test difference of string and C string.</a>
|
||
|
<a name="6210"><span class="lineNum"> 6210 </span> : : * @param __lhs String.</a>
|
||
|
<a name="6211"><span class="lineNum"> 6211 </span> : : * @param __rhs C string.</a>
|
||
|
<a name="6212"><span class="lineNum"> 6212 </span> : : * @return True if @a __lhs.compare(@a __rhs) != 0. False otherwise.</a>
|
||
|
<a name="6213"><span class="lineNum"> 6213 </span> : : */</a>
|
||
|
<a name="6214"><span class="lineNum"> 6214 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6215"><span class="lineNum"> 6215 </span> : : inline bool</a>
|
||
|
<a name="6216"><span class="lineNum"> 6216 </span> : : operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,</a>
|
||
|
<a name="6217"><span class="lineNum"> 6217 </span> : : const _CharT* __rhs)</a>
|
||
|
<a name="6218"><span class="lineNum"> 6218 </span> : : { return !(__lhs == __rhs); }</a>
|
||
|
<a name="6219"><span class="lineNum"> 6219 </span> : : </a>
|
||
|
<a name="6220"><span class="lineNum"> 6220 </span> : : // operator <</a>
|
||
|
<a name="6221"><span class="lineNum"> 6221 </span> : : /**</a>
|
||
|
<a name="6222"><span class="lineNum"> 6222 </span> : : * @brief Test if string precedes string.</a>
|
||
|
<a name="6223"><span class="lineNum"> 6223 </span> : : * @param __lhs First string.</a>
|
||
|
<a name="6224"><span class="lineNum"> 6224 </span> : : * @param __rhs Second string.</a>
|
||
|
<a name="6225"><span class="lineNum"> 6225 </span> : : * @return True if @a __lhs precedes @a __rhs. False otherwise.</a>
|
||
|
<a name="6226"><span class="lineNum"> 6226 </span> : : */</a>
|
||
|
<a name="6227"><span class="lineNum"> 6227 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6228"><span class="lineNum"> 6228 </span> : : inline bool</a>
|
||
|
<a name="6229"><span class="lineNum"> 6229 </span> : : operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,</a>
|
||
|
<a name="6230"><span class="lineNum"> 6230 </span> : : const basic_string<_CharT, _Traits, _Alloc>& __rhs)</a>
|
||
|
<a name="6231"><span class="lineNum"> 6231 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="6232"><span class="lineNum"> 6232 </span> : : { return __lhs.compare(__rhs) < 0; }</a>
|
||
|
<a name="6233"><span class="lineNum"> 6233 </span> : : </a>
|
||
|
<a name="6234"><span class="lineNum"> 6234 </span> : : /**</a>
|
||
|
<a name="6235"><span class="lineNum"> 6235 </span> : : * @brief Test if string precedes C string.</a>
|
||
|
<a name="6236"><span class="lineNum"> 6236 </span> : : * @param __lhs String.</a>
|
||
|
<a name="6237"><span class="lineNum"> 6237 </span> : : * @param __rhs C string.</a>
|
||
|
<a name="6238"><span class="lineNum"> 6238 </span> : : * @return True if @a __lhs precedes @a __rhs. False otherwise.</a>
|
||
|
<a name="6239"><span class="lineNum"> 6239 </span> : : */</a>
|
||
|
<a name="6240"><span class="lineNum"> 6240 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6241"><span class="lineNum"> 6241 </span> : : inline bool</a>
|
||
|
<a name="6242"><span class="lineNum"> 6242 </span> : : operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,</a>
|
||
|
<a name="6243"><span class="lineNum"> 6243 </span> : : const _CharT* __rhs)</a>
|
||
|
<a name="6244"><span class="lineNum"> 6244 </span> : : { return __lhs.compare(__rhs) < 0; }</a>
|
||
|
<a name="6245"><span class="lineNum"> 6245 </span> : : </a>
|
||
|
<a name="6246"><span class="lineNum"> 6246 </span> : : /**</a>
|
||
|
<a name="6247"><span class="lineNum"> 6247 </span> : : * @brief Test if C string precedes string.</a>
|
||
|
<a name="6248"><span class="lineNum"> 6248 </span> : : * @param __lhs C string.</a>
|
||
|
<a name="6249"><span class="lineNum"> 6249 </span> : : * @param __rhs String.</a>
|
||
|
<a name="6250"><span class="lineNum"> 6250 </span> : : * @return True if @a __lhs precedes @a __rhs. False otherwise.</a>
|
||
|
<a name="6251"><span class="lineNum"> 6251 </span> : : */</a>
|
||
|
<a name="6252"><span class="lineNum"> 6252 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6253"><span class="lineNum"> 6253 </span> : : inline bool</a>
|
||
|
<a name="6254"><span class="lineNum"> 6254 </span> : : operator<(const _CharT* __lhs,</a>
|
||
|
<a name="6255"><span class="lineNum"> 6255 </span> : : const basic_string<_CharT, _Traits, _Alloc>& __rhs)</a>
|
||
|
<a name="6256"><span class="lineNum"> 6256 </span> : : { return __rhs.compare(__lhs) > 0; }</a>
|
||
|
<a name="6257"><span class="lineNum"> 6257 </span> : : </a>
|
||
|
<a name="6258"><span class="lineNum"> 6258 </span> : : // operator ></a>
|
||
|
<a name="6259"><span class="lineNum"> 6259 </span> : : /**</a>
|
||
|
<a name="6260"><span class="lineNum"> 6260 </span> : : * @brief Test if string follows string.</a>
|
||
|
<a name="6261"><span class="lineNum"> 6261 </span> : : * @param __lhs First string.</a>
|
||
|
<a name="6262"><span class="lineNum"> 6262 </span> : : * @param __rhs Second string.</a>
|
||
|
<a name="6263"><span class="lineNum"> 6263 </span> : : * @return True if @a __lhs follows @a __rhs. False otherwise.</a>
|
||
|
<a name="6264"><span class="lineNum"> 6264 </span> : : */</a>
|
||
|
<a name="6265"><span class="lineNum"> 6265 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6266"><span class="lineNum"> 6266 </span> : : inline bool</a>
|
||
|
<a name="6267"><span class="lineNum"> 6267 </span> : : operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,</a>
|
||
|
<a name="6268"><span class="lineNum"> 6268 </span> : : const basic_string<_CharT, _Traits, _Alloc>& __rhs)</a>
|
||
|
<a name="6269"><span class="lineNum"> 6269 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="6270"><span class="lineNum"> 6270 </span> : : { return __lhs.compare(__rhs) > 0; }</a>
|
||
|
<a name="6271"><span class="lineNum"> 6271 </span> : : </a>
|
||
|
<a name="6272"><span class="lineNum"> 6272 </span> : : /**</a>
|
||
|
<a name="6273"><span class="lineNum"> 6273 </span> : : * @brief Test if string follows C string.</a>
|
||
|
<a name="6274"><span class="lineNum"> 6274 </span> : : * @param __lhs String.</a>
|
||
|
<a name="6275"><span class="lineNum"> 6275 </span> : : * @param __rhs C string.</a>
|
||
|
<a name="6276"><span class="lineNum"> 6276 </span> : : * @return True if @a __lhs follows @a __rhs. False otherwise.</a>
|
||
|
<a name="6277"><span class="lineNum"> 6277 </span> : : */</a>
|
||
|
<a name="6278"><span class="lineNum"> 6278 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6279"><span class="lineNum"> 6279 </span> : : inline bool</a>
|
||
|
<a name="6280"><span class="lineNum"> 6280 </span> : : operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,</a>
|
||
|
<a name="6281"><span class="lineNum"> 6281 </span> : : const _CharT* __rhs)</a>
|
||
|
<a name="6282"><span class="lineNum"> 6282 </span> : : { return __lhs.compare(__rhs) > 0; }</a>
|
||
|
<a name="6283"><span class="lineNum"> 6283 </span> : : </a>
|
||
|
<a name="6284"><span class="lineNum"> 6284 </span> : : /**</a>
|
||
|
<a name="6285"><span class="lineNum"> 6285 </span> : : * @brief Test if C string follows string.</a>
|
||
|
<a name="6286"><span class="lineNum"> 6286 </span> : : * @param __lhs C string.</a>
|
||
|
<a name="6287"><span class="lineNum"> 6287 </span> : : * @param __rhs String.</a>
|
||
|
<a name="6288"><span class="lineNum"> 6288 </span> : : * @return True if @a __lhs follows @a __rhs. False otherwise.</a>
|
||
|
<a name="6289"><span class="lineNum"> 6289 </span> : : */</a>
|
||
|
<a name="6290"><span class="lineNum"> 6290 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6291"><span class="lineNum"> 6291 </span> : : inline bool</a>
|
||
|
<a name="6292"><span class="lineNum"> 6292 </span> : : operator>(const _CharT* __lhs,</a>
|
||
|
<a name="6293"><span class="lineNum"> 6293 </span> : : const basic_string<_CharT, _Traits, _Alloc>& __rhs)</a>
|
||
|
<a name="6294"><span class="lineNum"> 6294 </span> : : { return __rhs.compare(__lhs) < 0; }</a>
|
||
|
<a name="6295"><span class="lineNum"> 6295 </span> : : </a>
|
||
|
<a name="6296"><span class="lineNum"> 6296 </span> : : // operator <=</a>
|
||
|
<a name="6297"><span class="lineNum"> 6297 </span> : : /**</a>
|
||
|
<a name="6298"><span class="lineNum"> 6298 </span> : : * @brief Test if string doesn't follow string.</a>
|
||
|
<a name="6299"><span class="lineNum"> 6299 </span> : : * @param __lhs First string.</a>
|
||
|
<a name="6300"><span class="lineNum"> 6300 </span> : : * @param __rhs Second string.</a>
|
||
|
<a name="6301"><span class="lineNum"> 6301 </span> : : * @return True if @a __lhs doesn't follow @a __rhs. False otherwise.</a>
|
||
|
<a name="6302"><span class="lineNum"> 6302 </span> : : */</a>
|
||
|
<a name="6303"><span class="lineNum"> 6303 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6304"><span class="lineNum"> 6304 </span> : : inline bool</a>
|
||
|
<a name="6305"><span class="lineNum"> 6305 </span> : : operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,</a>
|
||
|
<a name="6306"><span class="lineNum"> 6306 </span> : : const basic_string<_CharT, _Traits, _Alloc>& __rhs)</a>
|
||
|
<a name="6307"><span class="lineNum"> 6307 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="6308"><span class="lineNum"> 6308 </span> : : { return __lhs.compare(__rhs) <= 0; }</a>
|
||
|
<a name="6309"><span class="lineNum"> 6309 </span> : : </a>
|
||
|
<a name="6310"><span class="lineNum"> 6310 </span> : : /**</a>
|
||
|
<a name="6311"><span class="lineNum"> 6311 </span> : : * @brief Test if string doesn't follow C string.</a>
|
||
|
<a name="6312"><span class="lineNum"> 6312 </span> : : * @param __lhs String.</a>
|
||
|
<a name="6313"><span class="lineNum"> 6313 </span> : : * @param __rhs C string.</a>
|
||
|
<a name="6314"><span class="lineNum"> 6314 </span> : : * @return True if @a __lhs doesn't follow @a __rhs. False otherwise.</a>
|
||
|
<a name="6315"><span class="lineNum"> 6315 </span> : : */</a>
|
||
|
<a name="6316"><span class="lineNum"> 6316 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6317"><span class="lineNum"> 6317 </span> : : inline bool</a>
|
||
|
<a name="6318"><span class="lineNum"> 6318 </span> : : operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,</a>
|
||
|
<a name="6319"><span class="lineNum"> 6319 </span> : : const _CharT* __rhs)</a>
|
||
|
<a name="6320"><span class="lineNum"> 6320 </span> : : { return __lhs.compare(__rhs) <= 0; }</a>
|
||
|
<a name="6321"><span class="lineNum"> 6321 </span> : : </a>
|
||
|
<a name="6322"><span class="lineNum"> 6322 </span> : : /**</a>
|
||
|
<a name="6323"><span class="lineNum"> 6323 </span> : : * @brief Test if C string doesn't follow string.</a>
|
||
|
<a name="6324"><span class="lineNum"> 6324 </span> : : * @param __lhs C string.</a>
|
||
|
<a name="6325"><span class="lineNum"> 6325 </span> : : * @param __rhs String.</a>
|
||
|
<a name="6326"><span class="lineNum"> 6326 </span> : : * @return True if @a __lhs doesn't follow @a __rhs. False otherwise.</a>
|
||
|
<a name="6327"><span class="lineNum"> 6327 </span> : : */</a>
|
||
|
<a name="6328"><span class="lineNum"> 6328 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6329"><span class="lineNum"> 6329 </span> : : inline bool</a>
|
||
|
<a name="6330"><span class="lineNum"> 6330 </span> : : operator<=(const _CharT* __lhs,</a>
|
||
|
<a name="6331"><span class="lineNum"> 6331 </span> : : const basic_string<_CharT, _Traits, _Alloc>& __rhs)</a>
|
||
|
<a name="6332"><span class="lineNum"> 6332 </span> : : { return __rhs.compare(__lhs) >= 0; }</a>
|
||
|
<a name="6333"><span class="lineNum"> 6333 </span> : : </a>
|
||
|
<a name="6334"><span class="lineNum"> 6334 </span> : : // operator >=</a>
|
||
|
<a name="6335"><span class="lineNum"> 6335 </span> : : /**</a>
|
||
|
<a name="6336"><span class="lineNum"> 6336 </span> : : * @brief Test if string doesn't precede string.</a>
|
||
|
<a name="6337"><span class="lineNum"> 6337 </span> : : * @param __lhs First string.</a>
|
||
|
<a name="6338"><span class="lineNum"> 6338 </span> : : * @param __rhs Second string.</a>
|
||
|
<a name="6339"><span class="lineNum"> 6339 </span> : : * @return True if @a __lhs doesn't precede @a __rhs. False otherwise.</a>
|
||
|
<a name="6340"><span class="lineNum"> 6340 </span> : : */</a>
|
||
|
<a name="6341"><span class="lineNum"> 6341 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6342"><span class="lineNum"> 6342 </span> : : inline bool</a>
|
||
|
<a name="6343"><span class="lineNum"> 6343 </span> : : operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,</a>
|
||
|
<a name="6344"><span class="lineNum"> 6344 </span> : : const basic_string<_CharT, _Traits, _Alloc>& __rhs)</a>
|
||
|
<a name="6345"><span class="lineNum"> 6345 </span> : : _GLIBCXX_NOEXCEPT</a>
|
||
|
<a name="6346"><span class="lineNum"> 6346 </span> : : { return __lhs.compare(__rhs) >= 0; }</a>
|
||
|
<a name="6347"><span class="lineNum"> 6347 </span> : : </a>
|
||
|
<a name="6348"><span class="lineNum"> 6348 </span> : : /**</a>
|
||
|
<a name="6349"><span class="lineNum"> 6349 </span> : : * @brief Test if string doesn't precede C string.</a>
|
||
|
<a name="6350"><span class="lineNum"> 6350 </span> : : * @param __lhs String.</a>
|
||
|
<a name="6351"><span class="lineNum"> 6351 </span> : : * @param __rhs C string.</a>
|
||
|
<a name="6352"><span class="lineNum"> 6352 </span> : : * @return True if @a __lhs doesn't precede @a __rhs. False otherwise.</a>
|
||
|
<a name="6353"><span class="lineNum"> 6353 </span> : : */</a>
|
||
|
<a name="6354"><span class="lineNum"> 6354 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6355"><span class="lineNum"> 6355 </span> : : inline bool</a>
|
||
|
<a name="6356"><span class="lineNum"> 6356 </span> : : operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,</a>
|
||
|
<a name="6357"><span class="lineNum"> 6357 </span> : : const _CharT* __rhs)</a>
|
||
|
<a name="6358"><span class="lineNum"> 6358 </span> : : { return __lhs.compare(__rhs) >= 0; }</a>
|
||
|
<a name="6359"><span class="lineNum"> 6359 </span> : : </a>
|
||
|
<a name="6360"><span class="lineNum"> 6360 </span> : : /**</a>
|
||
|
<a name="6361"><span class="lineNum"> 6361 </span> : : * @brief Test if C string doesn't precede string.</a>
|
||
|
<a name="6362"><span class="lineNum"> 6362 </span> : : * @param __lhs C string.</a>
|
||
|
<a name="6363"><span class="lineNum"> 6363 </span> : : * @param __rhs String.</a>
|
||
|
<a name="6364"><span class="lineNum"> 6364 </span> : : * @return True if @a __lhs doesn't precede @a __rhs. False otherwise.</a>
|
||
|
<a name="6365"><span class="lineNum"> 6365 </span> : : */</a>
|
||
|
<a name="6366"><span class="lineNum"> 6366 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6367"><span class="lineNum"> 6367 </span> : : inline bool</a>
|
||
|
<a name="6368"><span class="lineNum"> 6368 </span> : : operator>=(const _CharT* __lhs,</a>
|
||
|
<a name="6369"><span class="lineNum"> 6369 </span> : : const basic_string<_CharT, _Traits, _Alloc>& __rhs)</a>
|
||
|
<a name="6370"><span class="lineNum"> 6370 </span> : : { return __rhs.compare(__lhs) <= 0; }</a>
|
||
|
<a name="6371"><span class="lineNum"> 6371 </span> : : </a>
|
||
|
<a name="6372"><span class="lineNum"> 6372 </span> : : /**</a>
|
||
|
<a name="6373"><span class="lineNum"> 6373 </span> : : * @brief Swap contents of two strings.</a>
|
||
|
<a name="6374"><span class="lineNum"> 6374 </span> : : * @param __lhs First string.</a>
|
||
|
<a name="6375"><span class="lineNum"> 6375 </span> : : * @param __rhs Second string.</a>
|
||
|
<a name="6376"><span class="lineNum"> 6376 </span> : : *</a>
|
||
|
<a name="6377"><span class="lineNum"> 6377 </span> : : * Exchanges the contents of @a __lhs and @a __rhs in constant time.</a>
|
||
|
<a name="6378"><span class="lineNum"> 6378 </span> : : */</a>
|
||
|
<a name="6379"><span class="lineNum"> 6379 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6380"><span class="lineNum"> 6380 </span> : : inline void</a>
|
||
|
<a name="6381"><span class="lineNum"> 6381 </span> : : swap(basic_string<_CharT, _Traits, _Alloc>& __lhs,</a>
|
||
|
<a name="6382"><span class="lineNum"> 6382 </span> : : basic_string<_CharT, _Traits, _Alloc>& __rhs)</a>
|
||
|
<a name="6383"><span class="lineNum"> 6383 </span> : : _GLIBCXX_NOEXCEPT_IF(noexcept(__lhs.swap(__rhs)))</a>
|
||
|
<a name="6384"><span class="lineNum"> 6384 </span> : : { __lhs.swap(__rhs); }</a>
|
||
|
<a name="6385"><span class="lineNum"> 6385 </span> : : </a>
|
||
|
<a name="6386"><span class="lineNum"> 6386 </span> : : </a>
|
||
|
<a name="6387"><span class="lineNum"> 6387 </span> : : /**</a>
|
||
|
<a name="6388"><span class="lineNum"> 6388 </span> : : * @brief Read stream into a string.</a>
|
||
|
<a name="6389"><span class="lineNum"> 6389 </span> : : * @param __is Input stream.</a>
|
||
|
<a name="6390"><span class="lineNum"> 6390 </span> : : * @param __str Buffer to store into.</a>
|
||
|
<a name="6391"><span class="lineNum"> 6391 </span> : : * @return Reference to the input stream.</a>
|
||
|
<a name="6392"><span class="lineNum"> 6392 </span> : : *</a>
|
||
|
<a name="6393"><span class="lineNum"> 6393 </span> : : * Stores characters from @a __is into @a __str until whitespace is</a>
|
||
|
<a name="6394"><span class="lineNum"> 6394 </span> : : * found, the end of the stream is encountered, or str.max_size()</a>
|
||
|
<a name="6395"><span class="lineNum"> 6395 </span> : : * is reached. If is.width() is non-zero, that is the limit on the</a>
|
||
|
<a name="6396"><span class="lineNum"> 6396 </span> : : * number of characters stored into @a __str. Any previous</a>
|
||
|
<a name="6397"><span class="lineNum"> 6397 </span> : : * contents of @a __str are erased.</a>
|
||
|
<a name="6398"><span class="lineNum"> 6398 </span> : : */</a>
|
||
|
<a name="6399"><span class="lineNum"> 6399 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6400"><span class="lineNum"> 6400 </span> : : basic_istream<_CharT, _Traits>&</a>
|
||
|
<a name="6401"><span class="lineNum"> 6401 </span> : : operator>>(basic_istream<_CharT, _Traits>& __is,</a>
|
||
|
<a name="6402"><span class="lineNum"> 6402 </span> : : basic_string<_CharT, _Traits, _Alloc>& __str);</a>
|
||
|
<a name="6403"><span class="lineNum"> 6403 </span> : : </a>
|
||
|
<a name="6404"><span class="lineNum"> 6404 </span> : : template<></a>
|
||
|
<a name="6405"><span class="lineNum"> 6405 </span> : : basic_istream<char>&</a>
|
||
|
<a name="6406"><span class="lineNum"> 6406 </span> : : operator>>(basic_istream<char>& __is, basic_string<char>& __str);</a>
|
||
|
<a name="6407"><span class="lineNum"> 6407 </span> : : </a>
|
||
|
<a name="6408"><span class="lineNum"> 6408 </span> : : /**</a>
|
||
|
<a name="6409"><span class="lineNum"> 6409 </span> : : * @brief Write string to a stream.</a>
|
||
|
<a name="6410"><span class="lineNum"> 6410 </span> : : * @param __os Output stream.</a>
|
||
|
<a name="6411"><span class="lineNum"> 6411 </span> : : * @param __str String to write out.</a>
|
||
|
<a name="6412"><span class="lineNum"> 6412 </span> : : * @return Reference to the output stream.</a>
|
||
|
<a name="6413"><span class="lineNum"> 6413 </span> : : *</a>
|
||
|
<a name="6414"><span class="lineNum"> 6414 </span> : : * Output characters of @a __str into os following the same rules as for</a>
|
||
|
<a name="6415"><span class="lineNum"> 6415 </span> : : * writing a C string.</a>
|
||
|
<a name="6416"><span class="lineNum"> 6416 </span> : : */</a>
|
||
|
<a name="6417"><span class="lineNum"> 6417 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6418"><span class="lineNum"> 6418 </span> : : inline basic_ostream<_CharT, _Traits>&</a>
|
||
|
<a name="6419"><span class="lineNum"> 6419 </span> : : operator<<(basic_ostream<_CharT, _Traits>& __os,</a>
|
||
|
<a name="6420"><span class="lineNum"> 6420 </span> : : const basic_string<_CharT, _Traits, _Alloc>& __str)</a>
|
||
|
<a name="6421"><span class="lineNum"> 6421 </span> : : {</a>
|
||
|
<a name="6422"><span class="lineNum"> 6422 </span> : : // _GLIBCXX_RESOLVE_LIB_DEFECTS</a>
|
||
|
<a name="6423"><span class="lineNum"> 6423 </span> : : // 586. string inserter not a formatted function</a>
|
||
|
<a name="6424"><span class="lineNum"> 6424 </span> : : return __ostream_insert(__os, __str.data(), __str.size());</a>
|
||
|
<a name="6425"><span class="lineNum"> 6425 </span> : : }</a>
|
||
|
<a name="6426"><span class="lineNum"> 6426 </span> : : </a>
|
||
|
<a name="6427"><span class="lineNum"> 6427 </span> : : /**</a>
|
||
|
<a name="6428"><span class="lineNum"> 6428 </span> : : * @brief Read a line from stream into a string.</a>
|
||
|
<a name="6429"><span class="lineNum"> 6429 </span> : : * @param __is Input stream.</a>
|
||
|
<a name="6430"><span class="lineNum"> 6430 </span> : : * @param __str Buffer to store into.</a>
|
||
|
<a name="6431"><span class="lineNum"> 6431 </span> : : * @param __delim Character marking end of line.</a>
|
||
|
<a name="6432"><span class="lineNum"> 6432 </span> : : * @return Reference to the input stream.</a>
|
||
|
<a name="6433"><span class="lineNum"> 6433 </span> : : *</a>
|
||
|
<a name="6434"><span class="lineNum"> 6434 </span> : : * Stores characters from @a __is into @a __str until @a __delim is</a>
|
||
|
<a name="6435"><span class="lineNum"> 6435 </span> : : * found, the end of the stream is encountered, or str.max_size()</a>
|
||
|
<a name="6436"><span class="lineNum"> 6436 </span> : : * is reached. Any previous contents of @a __str are erased. If</a>
|
||
|
<a name="6437"><span class="lineNum"> 6437 </span> : : * @a __delim is encountered, it is extracted but not stored into</a>
|
||
|
<a name="6438"><span class="lineNum"> 6438 </span> : : * @a __str.</a>
|
||
|
<a name="6439"><span class="lineNum"> 6439 </span> : : */</a>
|
||
|
<a name="6440"><span class="lineNum"> 6440 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6441"><span class="lineNum"> 6441 </span> : : basic_istream<_CharT, _Traits>&</a>
|
||
|
<a name="6442"><span class="lineNum"> 6442 </span> : : getline(basic_istream<_CharT, _Traits>& __is,</a>
|
||
|
<a name="6443"><span class="lineNum"> 6443 </span> : : basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim);</a>
|
||
|
<a name="6444"><span class="lineNum"> 6444 </span> : : </a>
|
||
|
<a name="6445"><span class="lineNum"> 6445 </span> : : /**</a>
|
||
|
<a name="6446"><span class="lineNum"> 6446 </span> : : * @brief Read a line from stream into a string.</a>
|
||
|
<a name="6447"><span class="lineNum"> 6447 </span> : : * @param __is Input stream.</a>
|
||
|
<a name="6448"><span class="lineNum"> 6448 </span> : : * @param __str Buffer to store into.</a>
|
||
|
<a name="6449"><span class="lineNum"> 6449 </span> : : * @return Reference to the input stream.</a>
|
||
|
<a name="6450"><span class="lineNum"> 6450 </span> : : *</a>
|
||
|
<a name="6451"><span class="lineNum"> 6451 </span> : : * Stores characters from is into @a __str until &apos;\n&apos; is</a>
|
||
|
<a name="6452"><span class="lineNum"> 6452 </span> : : * found, the end of the stream is encountered, or str.max_size()</a>
|
||
|
<a name="6453"><span class="lineNum"> 6453 </span> : : * is reached. Any previous contents of @a __str are erased. If</a>
|
||
|
<a name="6454"><span class="lineNum"> 6454 </span> : : * end of line is encountered, it is extracted but not stored into</a>
|
||
|
<a name="6455"><span class="lineNum"> 6455 </span> : : * @a __str.</a>
|
||
|
<a name="6456"><span class="lineNum"> 6456 </span> : : */</a>
|
||
|
<a name="6457"><span class="lineNum"> 6457 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6458"><span class="lineNum"> 6458 </span> : : inline basic_istream<_CharT, _Traits>&</a>
|
||
|
<a name="6459"><span class="lineNum"> 6459 </span> : : getline(basic_istream<_CharT, _Traits>& __is,</a>
|
||
|
<a name="6460"><span class="lineNum"> 6460 </span> : : basic_string<_CharT, _Traits, _Alloc>& __str)</a>
|
||
|
<a name="6461"><span class="lineNum"> 6461 </span> : : { return std::getline(__is, __str, __is.widen('\n')); }</a>
|
||
|
<a name="6462"><span class="lineNum"> 6462 </span> : : </a>
|
||
|
<a name="6463"><span class="lineNum"> 6463 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="6464"><span class="lineNum"> 6464 </span> : : /// Read a line from an rvalue stream into a string.</a>
|
||
|
<a name="6465"><span class="lineNum"> 6465 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6466"><span class="lineNum"> 6466 </span> : : inline basic_istream<_CharT, _Traits>&</a>
|
||
|
<a name="6467"><span class="lineNum"> 6467 </span> : : getline(basic_istream<_CharT, _Traits>&& __is,</a>
|
||
|
<a name="6468"><span class="lineNum"> 6468 </span> : : basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim)</a>
|
||
|
<a name="6469"><span class="lineNum"> 6469 </span> : : { return std::getline(__is, __str, __delim); }</a>
|
||
|
<a name="6470"><span class="lineNum"> 6470 </span> : : </a>
|
||
|
<a name="6471"><span class="lineNum"> 6471 </span> : : /// Read a line from an rvalue stream into a string.</a>
|
||
|
<a name="6472"><span class="lineNum"> 6472 </span> : : template<typename _CharT, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6473"><span class="lineNum"> 6473 </span> : : inline basic_istream<_CharT, _Traits>&</a>
|
||
|
<a name="6474"><span class="lineNum"> 6474 </span> : : getline(basic_istream<_CharT, _Traits>&& __is,</a>
|
||
|
<a name="6475"><span class="lineNum"> 6475 </span> : : basic_string<_CharT, _Traits, _Alloc>& __str)</a>
|
||
|
<a name="6476"><span class="lineNum"> 6476 </span> : : { return std::getline(__is, __str); }</a>
|
||
|
<a name="6477"><span class="lineNum"> 6477 </span> : : #endif</a>
|
||
|
<a name="6478"><span class="lineNum"> 6478 </span> : : </a>
|
||
|
<a name="6479"><span class="lineNum"> 6479 </span> : : template<></a>
|
||
|
<a name="6480"><span class="lineNum"> 6480 </span> : : basic_istream<char>&</a>
|
||
|
<a name="6481"><span class="lineNum"> 6481 </span> : : getline(basic_istream<char>& __in, basic_string<char>& __str,</a>
|
||
|
<a name="6482"><span class="lineNum"> 6482 </span> : : char __delim);</a>
|
||
|
<a name="6483"><span class="lineNum"> 6483 </span> : : </a>
|
||
|
<a name="6484"><span class="lineNum"> 6484 </span> : : #ifdef _GLIBCXX_USE_WCHAR_T</a>
|
||
|
<a name="6485"><span class="lineNum"> 6485 </span> : : template<></a>
|
||
|
<a name="6486"><span class="lineNum"> 6486 </span> : : basic_istream<wchar_t>&</a>
|
||
|
<a name="6487"><span class="lineNum"> 6487 </span> : : getline(basic_istream<wchar_t>& __in, basic_string<wchar_t>& __str,</a>
|
||
|
<a name="6488"><span class="lineNum"> 6488 </span> : : wchar_t __delim);</a>
|
||
|
<a name="6489"><span class="lineNum"> 6489 </span> : : #endif </a>
|
||
|
<a name="6490"><span class="lineNum"> 6490 </span> : : </a>
|
||
|
<a name="6491"><span class="lineNum"> 6491 </span> : : _GLIBCXX_END_NAMESPACE_VERSION</a>
|
||
|
<a name="6492"><span class="lineNum"> 6492 </span> : : } // namespace</a>
|
||
|
<a name="6493"><span class="lineNum"> 6493 </span> : : </a>
|
||
|
<a name="6494"><span class="lineNum"> 6494 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="6495"><span class="lineNum"> 6495 </span> : : </a>
|
||
|
<a name="6496"><span class="lineNum"> 6496 </span> : : #include <ext/string_conversions.h></a>
|
||
|
<a name="6497"><span class="lineNum"> 6497 </span> : : </a>
|
||
|
<a name="6498"><span class="lineNum"> 6498 </span> : : namespace std _GLIBCXX_VISIBILITY(default)</a>
|
||
|
<a name="6499"><span class="lineNum"> 6499 </span> : : {</a>
|
||
|
<a name="6500"><span class="lineNum"> 6500 </span> : : _GLIBCXX_BEGIN_NAMESPACE_VERSION</a>
|
||
|
<a name="6501"><span class="lineNum"> 6501 </span> : : _GLIBCXX_BEGIN_NAMESPACE_CXX11</a>
|
||
|
<a name="6502"><span class="lineNum"> 6502 </span> : : </a>
|
||
|
<a name="6503"><span class="lineNum"> 6503 </span> : : #if _GLIBCXX_USE_C99_STDLIB</a>
|
||
|
<a name="6504"><span class="lineNum"> 6504 </span> : : // 21.4 Numeric Conversions [string.conversions].</a>
|
||
|
<a name="6505"><span class="lineNum"> 6505 </span> : : inline int</a>
|
||
|
<a name="6506"><span class="lineNum"> 6506 </span> : : stoi(const string& __str, size_t* __idx = 0, int __base = 10)</a>
|
||
|
<a name="6507"><span class="lineNum"> 6507 </span> : : { return __gnu_cxx::__stoa<long, int>(&std::strtol, "stoi", __str.c_str(),</a>
|
||
|
<a name="6508"><span class="lineNum"> 6508 </span> : : __idx, __base); }</a>
|
||
|
<a name="6509"><span class="lineNum"> 6509 </span> : : </a>
|
||
|
<a name="6510"><span class="lineNum"> 6510 </span> : : inline long</a>
|
||
|
<a name="6511"><span class="lineNum"> 6511 </span> : : stol(const string& __str, size_t* __idx = 0, int __base = 10)</a>
|
||
|
<a name="6512"><span class="lineNum"> 6512 </span> : : { return __gnu_cxx::__stoa(&std::strtol, "stol", __str.c_str(),</a>
|
||
|
<a name="6513"><span class="lineNum"> 6513 </span> : : __idx, __base); }</a>
|
||
|
<a name="6514"><span class="lineNum"> 6514 </span> : : </a>
|
||
|
<a name="6515"><span class="lineNum"> 6515 </span> : : inline unsigned long</a>
|
||
|
<a name="6516"><span class="lineNum"> 6516 </span> : : stoul(const string& __str, size_t* __idx = 0, int __base = 10)</a>
|
||
|
<a name="6517"><span class="lineNum"> 6517 </span> : : { return __gnu_cxx::__stoa(&std::strtoul, "stoul", __str.c_str(),</a>
|
||
|
<a name="6518"><span class="lineNum"> 6518 </span> : : __idx, __base); }</a>
|
||
|
<a name="6519"><span class="lineNum"> 6519 </span> : : </a>
|
||
|
<a name="6520"><span class="lineNum"> 6520 </span> : : inline long long</a>
|
||
|
<a name="6521"><span class="lineNum"> 6521 </span> : : stoll(const string& __str, size_t* __idx = 0, int __base = 10)</a>
|
||
|
<a name="6522"><span class="lineNum"> 6522 </span> : : { return __gnu_cxx::__stoa(&std::strtoll, "stoll", __str.c_str(),</a>
|
||
|
<a name="6523"><span class="lineNum"> 6523 </span> : : __idx, __base); }</a>
|
||
|
<a name="6524"><span class="lineNum"> 6524 </span> : : </a>
|
||
|
<a name="6525"><span class="lineNum"> 6525 </span> : : inline unsigned long long</a>
|
||
|
<a name="6526"><span class="lineNum"> 6526 </span> : : stoull(const string& __str, size_t* __idx = 0, int __base = 10)</a>
|
||
|
<a name="6527"><span class="lineNum"> 6527 </span> : : { return __gnu_cxx::__stoa(&std::strtoull, "stoull", __str.c_str(),</a>
|
||
|
<a name="6528"><span class="lineNum"> 6528 </span> : : __idx, __base); }</a>
|
||
|
<a name="6529"><span class="lineNum"> 6529 </span> : : </a>
|
||
|
<a name="6530"><span class="lineNum"> 6530 </span> : : // NB: strtof vs strtod.</a>
|
||
|
<a name="6531"><span class="lineNum"> 6531 </span> : : inline float</a>
|
||
|
<a name="6532"><span class="lineNum"> 6532 </span> : : stof(const string& __str, size_t* __idx = 0)</a>
|
||
|
<a name="6533"><span class="lineNum"> 6533 </span> : : { return __gnu_cxx::__stoa(&std::strtof, "stof", __str.c_str(), __idx); }</a>
|
||
|
<a name="6534"><span class="lineNum"> 6534 </span> : : </a>
|
||
|
<a name="6535"><span class="lineNum"> 6535 </span> : : inline double</a>
|
||
|
<a name="6536"><span class="lineNum"> 6536 </span> : : stod(const string& __str, size_t* __idx = 0)</a>
|
||
|
<a name="6537"><span class="lineNum"> 6537 </span> : : { return __gnu_cxx::__stoa(&std::strtod, "stod", __str.c_str(), __idx); }</a>
|
||
|
<a name="6538"><span class="lineNum"> 6538 </span> : : </a>
|
||
|
<a name="6539"><span class="lineNum"> 6539 </span> : : inline long double</a>
|
||
|
<a name="6540"><span class="lineNum"> 6540 </span> : : stold(const string& __str, size_t* __idx = 0)</a>
|
||
|
<a name="6541"><span class="lineNum"> 6541 </span> : : { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); }</a>
|
||
|
<a name="6542"><span class="lineNum"> 6542 </span> : : #endif // _GLIBCXX_USE_C99_STDLIB</a>
|
||
|
<a name="6543"><span class="lineNum"> 6543 </span> : : </a>
|
||
|
<a name="6544"><span class="lineNum"> 6544 </span> : : #if _GLIBCXX_USE_C99_STDIO</a>
|
||
|
<a name="6545"><span class="lineNum"> 6545 </span> : : // NB: (v)snprintf vs sprintf.</a>
|
||
|
<a name="6546"><span class="lineNum"> 6546 </span> : : </a>
|
||
|
<a name="6547"><span class="lineNum"> 6547 </span> : : // DR 1261.</a>
|
||
|
<a name="6548"><span class="lineNum"> 6548 </span> : : inline string</a>
|
||
|
<a name="6549"><span class="lineNum"> 6549 </span> :<span class="lineCov"> 25 : to_string(int __val)</span></a>
|
||
|
<a name="6550"><span class="lineNum"> 6550 </span> : : { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, 4 * sizeof(int),</a>
|
||
|
<a name="6551"><span class="lineNum"> 6551 </span> :<span class="lineCov"> 25 : "%d", __val); }</span></a>
|
||
|
<a name="6552"><span class="lineNum"> 6552 </span> : : </a>
|
||
|
<a name="6553"><span class="lineNum"> 6553 </span> : : inline string</a>
|
||
|
<a name="6554"><span class="lineNum"> 6554 </span> : : to_string(unsigned __val)</a>
|
||
|
<a name="6555"><span class="lineNum"> 6555 </span> : : { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf,</a>
|
||
|
<a name="6556"><span class="lineNum"> 6556 </span> : : 4 * sizeof(unsigned),</a>
|
||
|
<a name="6557"><span class="lineNum"> 6557 </span> : : "%u", __val); }</a>
|
||
|
<a name="6558"><span class="lineNum"> 6558 </span> : : </a>
|
||
|
<a name="6559"><span class="lineNum"> 6559 </span> : : inline string</a>
|
||
|
<a name="6560"><span class="lineNum"> 6560 </span> : : to_string(long __val)</a>
|
||
|
<a name="6561"><span class="lineNum"> 6561 </span> : : { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, 4 * sizeof(long),</a>
|
||
|
<a name="6562"><span class="lineNum"> 6562 </span> : : "%ld", __val); }</a>
|
||
|
<a name="6563"><span class="lineNum"> 6563 </span> : : </a>
|
||
|
<a name="6564"><span class="lineNum"> 6564 </span> : : inline string</a>
|
||
|
<a name="6565"><span class="lineNum"> 6565 </span> : : to_string(unsigned long __val)</a>
|
||
|
<a name="6566"><span class="lineNum"> 6566 </span> : : { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf,</a>
|
||
|
<a name="6567"><span class="lineNum"> 6567 </span> : : 4 * sizeof(unsigned long),</a>
|
||
|
<a name="6568"><span class="lineNum"> 6568 </span> : : "%lu", __val); }</a>
|
||
|
<a name="6569"><span class="lineNum"> 6569 </span> : : </a>
|
||
|
<a name="6570"><span class="lineNum"> 6570 </span> : : inline string</a>
|
||
|
<a name="6571"><span class="lineNum"> 6571 </span> : : to_string(long long __val)</a>
|
||
|
<a name="6572"><span class="lineNum"> 6572 </span> : : { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf,</a>
|
||
|
<a name="6573"><span class="lineNum"> 6573 </span> : : 4 * sizeof(long long),</a>
|
||
|
<a name="6574"><span class="lineNum"> 6574 </span> : : "%lld", __val); }</a>
|
||
|
<a name="6575"><span class="lineNum"> 6575 </span> : : </a>
|
||
|
<a name="6576"><span class="lineNum"> 6576 </span> : : inline string</a>
|
||
|
<a name="6577"><span class="lineNum"> 6577 </span> : : to_string(unsigned long long __val)</a>
|
||
|
<a name="6578"><span class="lineNum"> 6578 </span> : : { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf,</a>
|
||
|
<a name="6579"><span class="lineNum"> 6579 </span> : : 4 * sizeof(unsigned long long),</a>
|
||
|
<a name="6580"><span class="lineNum"> 6580 </span> : : "%llu", __val); }</a>
|
||
|
<a name="6581"><span class="lineNum"> 6581 </span> : : </a>
|
||
|
<a name="6582"><span class="lineNum"> 6582 </span> : : inline string</a>
|
||
|
<a name="6583"><span class="lineNum"> 6583 </span> : : to_string(float __val)</a>
|
||
|
<a name="6584"><span class="lineNum"> 6584 </span> : : {</a>
|
||
|
<a name="6585"><span class="lineNum"> 6585 </span> : : const int __n = </a>
|
||
|
<a name="6586"><span class="lineNum"> 6586 </span> : : __gnu_cxx::__numeric_traits<float>::__max_exponent10 + 20;</a>
|
||
|
<a name="6587"><span class="lineNum"> 6587 </span> : : return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n,</a>
|
||
|
<a name="6588"><span class="lineNum"> 6588 </span> : : "%f", __val);</a>
|
||
|
<a name="6589"><span class="lineNum"> 6589 </span> : : }</a>
|
||
|
<a name="6590"><span class="lineNum"> 6590 </span> : : </a>
|
||
|
<a name="6591"><span class="lineNum"> 6591 </span> : : inline string</a>
|
||
|
<a name="6592"><span class="lineNum"> 6592 </span> : : to_string(double __val)</a>
|
||
|
<a name="6593"><span class="lineNum"> 6593 </span> : : {</a>
|
||
|
<a name="6594"><span class="lineNum"> 6594 </span> : : const int __n = </a>
|
||
|
<a name="6595"><span class="lineNum"> 6595 </span> : : __gnu_cxx::__numeric_traits<double>::__max_exponent10 + 20;</a>
|
||
|
<a name="6596"><span class="lineNum"> 6596 </span> : : return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n,</a>
|
||
|
<a name="6597"><span class="lineNum"> 6597 </span> : : "%f", __val);</a>
|
||
|
<a name="6598"><span class="lineNum"> 6598 </span> : : }</a>
|
||
|
<a name="6599"><span class="lineNum"> 6599 </span> : : </a>
|
||
|
<a name="6600"><span class="lineNum"> 6600 </span> : : inline string</a>
|
||
|
<a name="6601"><span class="lineNum"> 6601 </span> : : to_string(long double __val)</a>
|
||
|
<a name="6602"><span class="lineNum"> 6602 </span> : : {</a>
|
||
|
<a name="6603"><span class="lineNum"> 6603 </span> : : const int __n = </a>
|
||
|
<a name="6604"><span class="lineNum"> 6604 </span> : : __gnu_cxx::__numeric_traits<long double>::__max_exponent10 + 20;</a>
|
||
|
<a name="6605"><span class="lineNum"> 6605 </span> : : return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n,</a>
|
||
|
<a name="6606"><span class="lineNum"> 6606 </span> : : "%Lf", __val);</a>
|
||
|
<a name="6607"><span class="lineNum"> 6607 </span> : : }</a>
|
||
|
<a name="6608"><span class="lineNum"> 6608 </span> : : #endif // _GLIBCXX_USE_C99_STDIO</a>
|
||
|
<a name="6609"><span class="lineNum"> 6609 </span> : : </a>
|
||
|
<a name="6610"><span class="lineNum"> 6610 </span> : : #if defined(_GLIBCXX_USE_WCHAR_T) && _GLIBCXX_USE_C99_WCHAR</a>
|
||
|
<a name="6611"><span class="lineNum"> 6611 </span> : : inline int </a>
|
||
|
<a name="6612"><span class="lineNum"> 6612 </span> : : stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)</a>
|
||
|
<a name="6613"><span class="lineNum"> 6613 </span> : : { return __gnu_cxx::__stoa<long, int>(&std::wcstol, "stoi", __str.c_str(),</a>
|
||
|
<a name="6614"><span class="lineNum"> 6614 </span> : : __idx, __base); }</a>
|
||
|
<a name="6615"><span class="lineNum"> 6615 </span> : : </a>
|
||
|
<a name="6616"><span class="lineNum"> 6616 </span> : : inline long </a>
|
||
|
<a name="6617"><span class="lineNum"> 6617 </span> : : stol(const wstring& __str, size_t* __idx = 0, int __base = 10)</a>
|
||
|
<a name="6618"><span class="lineNum"> 6618 </span> : : { return __gnu_cxx::__stoa(&std::wcstol, "stol", __str.c_str(),</a>
|
||
|
<a name="6619"><span class="lineNum"> 6619 </span> : : __idx, __base); }</a>
|
||
|
<a name="6620"><span class="lineNum"> 6620 </span> : : </a>
|
||
|
<a name="6621"><span class="lineNum"> 6621 </span> : : inline unsigned long</a>
|
||
|
<a name="6622"><span class="lineNum"> 6622 </span> : : stoul(const wstring& __str, size_t* __idx = 0, int __base = 10)</a>
|
||
|
<a name="6623"><span class="lineNum"> 6623 </span> : : { return __gnu_cxx::__stoa(&std::wcstoul, "stoul", __str.c_str(),</a>
|
||
|
<a name="6624"><span class="lineNum"> 6624 </span> : : __idx, __base); }</a>
|
||
|
<a name="6625"><span class="lineNum"> 6625 </span> : : </a>
|
||
|
<a name="6626"><span class="lineNum"> 6626 </span> : : inline long long</a>
|
||
|
<a name="6627"><span class="lineNum"> 6627 </span> : : stoll(const wstring& __str, size_t* __idx = 0, int __base = 10)</a>
|
||
|
<a name="6628"><span class="lineNum"> 6628 </span> : : { return __gnu_cxx::__stoa(&std::wcstoll, "stoll", __str.c_str(),</a>
|
||
|
<a name="6629"><span class="lineNum"> 6629 </span> : : __idx, __base); }</a>
|
||
|
<a name="6630"><span class="lineNum"> 6630 </span> : : </a>
|
||
|
<a name="6631"><span class="lineNum"> 6631 </span> : : inline unsigned long long</a>
|
||
|
<a name="6632"><span class="lineNum"> 6632 </span> : : stoull(const wstring& __str, size_t* __idx = 0, int __base = 10)</a>
|
||
|
<a name="6633"><span class="lineNum"> 6633 </span> : : { return __gnu_cxx::__stoa(&std::wcstoull, "stoull", __str.c_str(),</a>
|
||
|
<a name="6634"><span class="lineNum"> 6634 </span> : : __idx, __base); }</a>
|
||
|
<a name="6635"><span class="lineNum"> 6635 </span> : : </a>
|
||
|
<a name="6636"><span class="lineNum"> 6636 </span> : : // NB: wcstof vs wcstod.</a>
|
||
|
<a name="6637"><span class="lineNum"> 6637 </span> : : inline float</a>
|
||
|
<a name="6638"><span class="lineNum"> 6638 </span> : : stof(const wstring& __str, size_t* __idx = 0)</a>
|
||
|
<a name="6639"><span class="lineNum"> 6639 </span> : : { return __gnu_cxx::__stoa(&std::wcstof, "stof", __str.c_str(), __idx); }</a>
|
||
|
<a name="6640"><span class="lineNum"> 6640 </span> : : </a>
|
||
|
<a name="6641"><span class="lineNum"> 6641 </span> : : inline double</a>
|
||
|
<a name="6642"><span class="lineNum"> 6642 </span> : : stod(const wstring& __str, size_t* __idx = 0)</a>
|
||
|
<a name="6643"><span class="lineNum"> 6643 </span> : : { return __gnu_cxx::__stoa(&std::wcstod, "stod", __str.c_str(), __idx); }</a>
|
||
|
<a name="6644"><span class="lineNum"> 6644 </span> : : </a>
|
||
|
<a name="6645"><span class="lineNum"> 6645 </span> : : inline long double</a>
|
||
|
<a name="6646"><span class="lineNum"> 6646 </span> : : stold(const wstring& __str, size_t* __idx = 0)</a>
|
||
|
<a name="6647"><span class="lineNum"> 6647 </span> : : { return __gnu_cxx::__stoa(&std::wcstold, "stold", __str.c_str(), __idx); }</a>
|
||
|
<a name="6648"><span class="lineNum"> 6648 </span> : : </a>
|
||
|
<a name="6649"><span class="lineNum"> 6649 </span> : : #ifndef _GLIBCXX_HAVE_BROKEN_VSWPRINTF</a>
|
||
|
<a name="6650"><span class="lineNum"> 6650 </span> : : // DR 1261.</a>
|
||
|
<a name="6651"><span class="lineNum"> 6651 </span> : : inline wstring</a>
|
||
|
<a name="6652"><span class="lineNum"> 6652 </span> : : to_wstring(int __val)</a>
|
||
|
<a name="6653"><span class="lineNum"> 6653 </span> : : { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, 4 * sizeof(int),</a>
|
||
|
<a name="6654"><span class="lineNum"> 6654 </span> : : L"%d", __val); }</a>
|
||
|
<a name="6655"><span class="lineNum"> 6655 </span> : : </a>
|
||
|
<a name="6656"><span class="lineNum"> 6656 </span> : : inline wstring</a>
|
||
|
<a name="6657"><span class="lineNum"> 6657 </span> : : to_wstring(unsigned __val)</a>
|
||
|
<a name="6658"><span class="lineNum"> 6658 </span> : : { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf,</a>
|
||
|
<a name="6659"><span class="lineNum"> 6659 </span> : : 4 * sizeof(unsigned),</a>
|
||
|
<a name="6660"><span class="lineNum"> 6660 </span> : : L"%u", __val); }</a>
|
||
|
<a name="6661"><span class="lineNum"> 6661 </span> : : </a>
|
||
|
<a name="6662"><span class="lineNum"> 6662 </span> : : inline wstring</a>
|
||
|
<a name="6663"><span class="lineNum"> 6663 </span> : : to_wstring(long __val)</a>
|
||
|
<a name="6664"><span class="lineNum"> 6664 </span> : : { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, 4 * sizeof(long),</a>
|
||
|
<a name="6665"><span class="lineNum"> 6665 </span> : : L"%ld", __val); }</a>
|
||
|
<a name="6666"><span class="lineNum"> 6666 </span> : : </a>
|
||
|
<a name="6667"><span class="lineNum"> 6667 </span> : : inline wstring</a>
|
||
|
<a name="6668"><span class="lineNum"> 6668 </span> : : to_wstring(unsigned long __val)</a>
|
||
|
<a name="6669"><span class="lineNum"> 6669 </span> : : { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf,</a>
|
||
|
<a name="6670"><span class="lineNum"> 6670 </span> : : 4 * sizeof(unsigned long),</a>
|
||
|
<a name="6671"><span class="lineNum"> 6671 </span> : : L"%lu", __val); }</a>
|
||
|
<a name="6672"><span class="lineNum"> 6672 </span> : : </a>
|
||
|
<a name="6673"><span class="lineNum"> 6673 </span> : : inline wstring</a>
|
||
|
<a name="6674"><span class="lineNum"> 6674 </span> : : to_wstring(long long __val)</a>
|
||
|
<a name="6675"><span class="lineNum"> 6675 </span> : : { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf,</a>
|
||
|
<a name="6676"><span class="lineNum"> 6676 </span> : : 4 * sizeof(long long),</a>
|
||
|
<a name="6677"><span class="lineNum"> 6677 </span> : : L"%lld", __val); }</a>
|
||
|
<a name="6678"><span class="lineNum"> 6678 </span> : : </a>
|
||
|
<a name="6679"><span class="lineNum"> 6679 </span> : : inline wstring</a>
|
||
|
<a name="6680"><span class="lineNum"> 6680 </span> : : to_wstring(unsigned long long __val)</a>
|
||
|
<a name="6681"><span class="lineNum"> 6681 </span> : : { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf,</a>
|
||
|
<a name="6682"><span class="lineNum"> 6682 </span> : : 4 * sizeof(unsigned long long),</a>
|
||
|
<a name="6683"><span class="lineNum"> 6683 </span> : : L"%llu", __val); }</a>
|
||
|
<a name="6684"><span class="lineNum"> 6684 </span> : : </a>
|
||
|
<a name="6685"><span class="lineNum"> 6685 </span> : : inline wstring</a>
|
||
|
<a name="6686"><span class="lineNum"> 6686 </span> : : to_wstring(float __val)</a>
|
||
|
<a name="6687"><span class="lineNum"> 6687 </span> : : {</a>
|
||
|
<a name="6688"><span class="lineNum"> 6688 </span> : : const int __n =</a>
|
||
|
<a name="6689"><span class="lineNum"> 6689 </span> : : __gnu_cxx::__numeric_traits<float>::__max_exponent10 + 20;</a>
|
||
|
<a name="6690"><span class="lineNum"> 6690 </span> : : return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, __n,</a>
|
||
|
<a name="6691"><span class="lineNum"> 6691 </span> : : L"%f", __val);</a>
|
||
|
<a name="6692"><span class="lineNum"> 6692 </span> : : }</a>
|
||
|
<a name="6693"><span class="lineNum"> 6693 </span> : : </a>
|
||
|
<a name="6694"><span class="lineNum"> 6694 </span> : : inline wstring</a>
|
||
|
<a name="6695"><span class="lineNum"> 6695 </span> : : to_wstring(double __val)</a>
|
||
|
<a name="6696"><span class="lineNum"> 6696 </span> : : {</a>
|
||
|
<a name="6697"><span class="lineNum"> 6697 </span> : : const int __n =</a>
|
||
|
<a name="6698"><span class="lineNum"> 6698 </span> : : __gnu_cxx::__numeric_traits<double>::__max_exponent10 + 20;</a>
|
||
|
<a name="6699"><span class="lineNum"> 6699 </span> : : return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, __n,</a>
|
||
|
<a name="6700"><span class="lineNum"> 6700 </span> : : L"%f", __val);</a>
|
||
|
<a name="6701"><span class="lineNum"> 6701 </span> : : }</a>
|
||
|
<a name="6702"><span class="lineNum"> 6702 </span> : : </a>
|
||
|
<a name="6703"><span class="lineNum"> 6703 </span> : : inline wstring</a>
|
||
|
<a name="6704"><span class="lineNum"> 6704 </span> : : to_wstring(long double __val)</a>
|
||
|
<a name="6705"><span class="lineNum"> 6705 </span> : : {</a>
|
||
|
<a name="6706"><span class="lineNum"> 6706 </span> : : const int __n =</a>
|
||
|
<a name="6707"><span class="lineNum"> 6707 </span> : : __gnu_cxx::__numeric_traits<long double>::__max_exponent10 + 20;</a>
|
||
|
<a name="6708"><span class="lineNum"> 6708 </span> : : return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, __n,</a>
|
||
|
<a name="6709"><span class="lineNum"> 6709 </span> : : L"%Lf", __val);</a>
|
||
|
<a name="6710"><span class="lineNum"> 6710 </span> : : }</a>
|
||
|
<a name="6711"><span class="lineNum"> 6711 </span> : : #endif // _GLIBCXX_HAVE_BROKEN_VSWPRINTF</a>
|
||
|
<a name="6712"><span class="lineNum"> 6712 </span> : : #endif // _GLIBCXX_USE_WCHAR_T && _GLIBCXX_USE_C99_WCHAR</a>
|
||
|
<a name="6713"><span class="lineNum"> 6713 </span> : : </a>
|
||
|
<a name="6714"><span class="lineNum"> 6714 </span> : : _GLIBCXX_END_NAMESPACE_CXX11</a>
|
||
|
<a name="6715"><span class="lineNum"> 6715 </span> : : _GLIBCXX_END_NAMESPACE_VERSION</a>
|
||
|
<a name="6716"><span class="lineNum"> 6716 </span> : : } // namespace</a>
|
||
|
<a name="6717"><span class="lineNum"> 6717 </span> : : </a>
|
||
|
<a name="6718"><span class="lineNum"> 6718 </span> : : #endif /* C++11 */</a>
|
||
|
<a name="6719"><span class="lineNum"> 6719 </span> : : </a>
|
||
|
<a name="6720"><span class="lineNum"> 6720 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="6721"><span class="lineNum"> 6721 </span> : : </a>
|
||
|
<a name="6722"><span class="lineNum"> 6722 </span> : : #include <bits/functional_hash.h></a>
|
||
|
<a name="6723"><span class="lineNum"> 6723 </span> : : </a>
|
||
|
<a name="6724"><span class="lineNum"> 6724 </span> : : namespace std _GLIBCXX_VISIBILITY(default)</a>
|
||
|
<a name="6725"><span class="lineNum"> 6725 </span> : : {</a>
|
||
|
<a name="6726"><span class="lineNum"> 6726 </span> : : _GLIBCXX_BEGIN_NAMESPACE_VERSION</a>
|
||
|
<a name="6727"><span class="lineNum"> 6727 </span> : : </a>
|
||
|
<a name="6728"><span class="lineNum"> 6728 </span> : : // DR 1182.</a>
|
||
|
<a name="6729"><span class="lineNum"> 6729 </span> : : </a>
|
||
|
<a name="6730"><span class="lineNum"> 6730 </span> : : #ifndef _GLIBCXX_COMPATIBILITY_CXX0X</a>
|
||
|
<a name="6731"><span class="lineNum"> 6731 </span> : : /// std::hash specialization for string.</a>
|
||
|
<a name="6732"><span class="lineNum"> 6732 </span> : : template<></a>
|
||
|
<a name="6733"><span class="lineNum"> 6733 </span> : : struct hash<string></a>
|
||
|
<a name="6734"><span class="lineNum"> 6734 </span> : : : public __hash_base<size_t, string></a>
|
||
|
<a name="6735"><span class="lineNum"> 6735 </span> : : {</a>
|
||
|
<a name="6736"><span class="lineNum"> 6736 </span> : : size_t</a>
|
||
|
<a name="6737"><span class="lineNum"> 6737 </span> : : operator()(const string& __s) const noexcept</a>
|
||
|
<a name="6738"><span class="lineNum"> 6738 </span> : : { return std::_Hash_impl::hash(__s.data(), __s.length()); }</a>
|
||
|
<a name="6739"><span class="lineNum"> 6739 </span> : : };</a>
|
||
|
<a name="6740"><span class="lineNum"> 6740 </span> : : </a>
|
||
|
<a name="6741"><span class="lineNum"> 6741 </span> : : template<></a>
|
||
|
<a name="6742"><span class="lineNum"> 6742 </span> : : struct __is_fast_hash<hash<string>> : std::false_type</a>
|
||
|
<a name="6743"><span class="lineNum"> 6743 </span> : : { };</a>
|
||
|
<a name="6744"><span class="lineNum"> 6744 </span> : : </a>
|
||
|
<a name="6745"><span class="lineNum"> 6745 </span> : : #ifdef _GLIBCXX_USE_WCHAR_T</a>
|
||
|
<a name="6746"><span class="lineNum"> 6746 </span> : : /// std::hash specialization for wstring.</a>
|
||
|
<a name="6747"><span class="lineNum"> 6747 </span> : : template<></a>
|
||
|
<a name="6748"><span class="lineNum"> 6748 </span> : : struct hash<wstring></a>
|
||
|
<a name="6749"><span class="lineNum"> 6749 </span> : : : public __hash_base<size_t, wstring></a>
|
||
|
<a name="6750"><span class="lineNum"> 6750 </span> : : {</a>
|
||
|
<a name="6751"><span class="lineNum"> 6751 </span> : : size_t</a>
|
||
|
<a name="6752"><span class="lineNum"> 6752 </span> : : operator()(const wstring& __s) const noexcept</a>
|
||
|
<a name="6753"><span class="lineNum"> 6753 </span> : : { return std::_Hash_impl::hash(__s.data(),</a>
|
||
|
<a name="6754"><span class="lineNum"> 6754 </span> : : __s.length() * sizeof(wchar_t)); }</a>
|
||
|
<a name="6755"><span class="lineNum"> 6755 </span> : : };</a>
|
||
|
<a name="6756"><span class="lineNum"> 6756 </span> : : </a>
|
||
|
<a name="6757"><span class="lineNum"> 6757 </span> : : template<></a>
|
||
|
<a name="6758"><span class="lineNum"> 6758 </span> : : struct __is_fast_hash<hash<wstring>> : std::false_type</a>
|
||
|
<a name="6759"><span class="lineNum"> 6759 </span> : : { };</a>
|
||
|
<a name="6760"><span class="lineNum"> 6760 </span> : : #endif</a>
|
||
|
<a name="6761"><span class="lineNum"> 6761 </span> : : #endif /* _GLIBCXX_COMPATIBILITY_CXX0X */</a>
|
||
|
<a name="6762"><span class="lineNum"> 6762 </span> : : </a>
|
||
|
<a name="6763"><span class="lineNum"> 6763 </span> : : #ifdef _GLIBCXX_USE_CHAR8_T</a>
|
||
|
<a name="6764"><span class="lineNum"> 6764 </span> : : /// std::hash specialization for u8string.</a>
|
||
|
<a name="6765"><span class="lineNum"> 6765 </span> : : template<></a>
|
||
|
<a name="6766"><span class="lineNum"> 6766 </span> : : struct hash<u8string></a>
|
||
|
<a name="6767"><span class="lineNum"> 6767 </span> : : : public __hash_base<size_t, u8string></a>
|
||
|
<a name="6768"><span class="lineNum"> 6768 </span> : : {</a>
|
||
|
<a name="6769"><span class="lineNum"> 6769 </span> : : size_t</a>
|
||
|
<a name="6770"><span class="lineNum"> 6770 </span> : : operator()(const u8string& __s) const noexcept</a>
|
||
|
<a name="6771"><span class="lineNum"> 6771 </span> : : { return std::_Hash_impl::hash(__s.data(),</a>
|
||
|
<a name="6772"><span class="lineNum"> 6772 </span> : : __s.length() * sizeof(char8_t)); }</a>
|
||
|
<a name="6773"><span class="lineNum"> 6773 </span> : : };</a>
|
||
|
<a name="6774"><span class="lineNum"> 6774 </span> : : </a>
|
||
|
<a name="6775"><span class="lineNum"> 6775 </span> : : template<></a>
|
||
|
<a name="6776"><span class="lineNum"> 6776 </span> : : struct __is_fast_hash<hash<u8string>> : std::false_type</a>
|
||
|
<a name="6777"><span class="lineNum"> 6777 </span> : : { };</a>
|
||
|
<a name="6778"><span class="lineNum"> 6778 </span> : : #endif</a>
|
||
|
<a name="6779"><span class="lineNum"> 6779 </span> : : </a>
|
||
|
<a name="6780"><span class="lineNum"> 6780 </span> : : /// std::hash specialization for u16string.</a>
|
||
|
<a name="6781"><span class="lineNum"> 6781 </span> : : template<></a>
|
||
|
<a name="6782"><span class="lineNum"> 6782 </span> : : struct hash<u16string></a>
|
||
|
<a name="6783"><span class="lineNum"> 6783 </span> : : : public __hash_base<size_t, u16string></a>
|
||
|
<a name="6784"><span class="lineNum"> 6784 </span> : : {</a>
|
||
|
<a name="6785"><span class="lineNum"> 6785 </span> : : size_t</a>
|
||
|
<a name="6786"><span class="lineNum"> 6786 </span> : : operator()(const u16string& __s) const noexcept</a>
|
||
|
<a name="6787"><span class="lineNum"> 6787 </span> : : { return std::_Hash_impl::hash(__s.data(),</a>
|
||
|
<a name="6788"><span class="lineNum"> 6788 </span> : : __s.length() * sizeof(char16_t)); }</a>
|
||
|
<a name="6789"><span class="lineNum"> 6789 </span> : : };</a>
|
||
|
<a name="6790"><span class="lineNum"> 6790 </span> : : </a>
|
||
|
<a name="6791"><span class="lineNum"> 6791 </span> : : template<></a>
|
||
|
<a name="6792"><span class="lineNum"> 6792 </span> : : struct __is_fast_hash<hash<u16string>> : std::false_type</a>
|
||
|
<a name="6793"><span class="lineNum"> 6793 </span> : : { };</a>
|
||
|
<a name="6794"><span class="lineNum"> 6794 </span> : : </a>
|
||
|
<a name="6795"><span class="lineNum"> 6795 </span> : : /// std::hash specialization for u32string.</a>
|
||
|
<a name="6796"><span class="lineNum"> 6796 </span> : : template<></a>
|
||
|
<a name="6797"><span class="lineNum"> 6797 </span> : : struct hash<u32string></a>
|
||
|
<a name="6798"><span class="lineNum"> 6798 </span> : : : public __hash_base<size_t, u32string></a>
|
||
|
<a name="6799"><span class="lineNum"> 6799 </span> : : {</a>
|
||
|
<a name="6800"><span class="lineNum"> 6800 </span> : : size_t</a>
|
||
|
<a name="6801"><span class="lineNum"> 6801 </span> : : operator()(const u32string& __s) const noexcept</a>
|
||
|
<a name="6802"><span class="lineNum"> 6802 </span> : : { return std::_Hash_impl::hash(__s.data(),</a>
|
||
|
<a name="6803"><span class="lineNum"> 6803 </span> : : __s.length() * sizeof(char32_t)); }</a>
|
||
|
<a name="6804"><span class="lineNum"> 6804 </span> : : };</a>
|
||
|
<a name="6805"><span class="lineNum"> 6805 </span> : : </a>
|
||
|
<a name="6806"><span class="lineNum"> 6806 </span> : : template<></a>
|
||
|
<a name="6807"><span class="lineNum"> 6807 </span> : : struct __is_fast_hash<hash<u32string>> : std::false_type</a>
|
||
|
<a name="6808"><span class="lineNum"> 6808 </span> : : { };</a>
|
||
|
<a name="6809"><span class="lineNum"> 6809 </span> : : </a>
|
||
|
<a name="6810"><span class="lineNum"> 6810 </span> : : #if __cplusplus >= 201402L</a>
|
||
|
<a name="6811"><span class="lineNum"> 6811 </span> : : </a>
|
||
|
<a name="6812"><span class="lineNum"> 6812 </span> : : #define __cpp_lib_string_udls 201304</a>
|
||
|
<a name="6813"><span class="lineNum"> 6813 </span> : : </a>
|
||
|
<a name="6814"><span class="lineNum"> 6814 </span> : : inline namespace literals</a>
|
||
|
<a name="6815"><span class="lineNum"> 6815 </span> : : {</a>
|
||
|
<a name="6816"><span class="lineNum"> 6816 </span> : : inline namespace string_literals</a>
|
||
|
<a name="6817"><span class="lineNum"> 6817 </span> : : {</a>
|
||
|
<a name="6818"><span class="lineNum"> 6818 </span> : : #pragma GCC diagnostic push</a>
|
||
|
<a name="6819"><span class="lineNum"> 6819 </span> : : #pragma GCC diagnostic ignored "-Wliteral-suffix"</a>
|
||
|
<a name="6820"><span class="lineNum"> 6820 </span> : : _GLIBCXX_DEFAULT_ABI_TAG</a>
|
||
|
<a name="6821"><span class="lineNum"> 6821 </span> : : inline basic_string<char></a>
|
||
|
<a name="6822"><span class="lineNum"> 6822 </span> : : operator""s(const char* __str, size_t __len)</a>
|
||
|
<a name="6823"><span class="lineNum"> 6823 </span> : : { return basic_string<char>{__str, __len}; }</a>
|
||
|
<a name="6824"><span class="lineNum"> 6824 </span> : : </a>
|
||
|
<a name="6825"><span class="lineNum"> 6825 </span> : : #ifdef _GLIBCXX_USE_WCHAR_T</a>
|
||
|
<a name="6826"><span class="lineNum"> 6826 </span> : : _GLIBCXX_DEFAULT_ABI_TAG</a>
|
||
|
<a name="6827"><span class="lineNum"> 6827 </span> : : inline basic_string<wchar_t></a>
|
||
|
<a name="6828"><span class="lineNum"> 6828 </span> : : operator""s(const wchar_t* __str, size_t __len)</a>
|
||
|
<a name="6829"><span class="lineNum"> 6829 </span> : : { return basic_string<wchar_t>{__str, __len}; }</a>
|
||
|
<a name="6830"><span class="lineNum"> 6830 </span> : : #endif</a>
|
||
|
<a name="6831"><span class="lineNum"> 6831 </span> : : </a>
|
||
|
<a name="6832"><span class="lineNum"> 6832 </span> : : #ifdef _GLIBCXX_USE_CHAR8_T</a>
|
||
|
<a name="6833"><span class="lineNum"> 6833 </span> : : _GLIBCXX_DEFAULT_ABI_TAG</a>
|
||
|
<a name="6834"><span class="lineNum"> 6834 </span> : : inline basic_string<char8_t></a>
|
||
|
<a name="6835"><span class="lineNum"> 6835 </span> : : operator""s(const char8_t* __str, size_t __len)</a>
|
||
|
<a name="6836"><span class="lineNum"> 6836 </span> : : { return basic_string<char8_t>{__str, __len}; }</a>
|
||
|
<a name="6837"><span class="lineNum"> 6837 </span> : : #endif</a>
|
||
|
<a name="6838"><span class="lineNum"> 6838 </span> : : </a>
|
||
|
<a name="6839"><span class="lineNum"> 6839 </span> : : _GLIBCXX_DEFAULT_ABI_TAG</a>
|
||
|
<a name="6840"><span class="lineNum"> 6840 </span> : : inline basic_string<char16_t></a>
|
||
|
<a name="6841"><span class="lineNum"> 6841 </span> : : operator""s(const char16_t* __str, size_t __len)</a>
|
||
|
<a name="6842"><span class="lineNum"> 6842 </span> : : { return basic_string<char16_t>{__str, __len}; }</a>
|
||
|
<a name="6843"><span class="lineNum"> 6843 </span> : : </a>
|
||
|
<a name="6844"><span class="lineNum"> 6844 </span> : : _GLIBCXX_DEFAULT_ABI_TAG</a>
|
||
|
<a name="6845"><span class="lineNum"> 6845 </span> : : inline basic_string<char32_t></a>
|
||
|
<a name="6846"><span class="lineNum"> 6846 </span> : : operator""s(const char32_t* __str, size_t __len)</a>
|
||
|
<a name="6847"><span class="lineNum"> 6847 </span> : : { return basic_string<char32_t>{__str, __len}; }</a>
|
||
|
<a name="6848"><span class="lineNum"> 6848 </span> : : </a>
|
||
|
<a name="6849"><span class="lineNum"> 6849 </span> : : #pragma GCC diagnostic pop</a>
|
||
|
<a name="6850"><span class="lineNum"> 6850 </span> : : } // inline namespace string_literals</a>
|
||
|
<a name="6851"><span class="lineNum"> 6851 </span> : : } // inline namespace literals</a>
|
||
|
<a name="6852"><span class="lineNum"> 6852 </span> : : </a>
|
||
|
<a name="6853"><span class="lineNum"> 6853 </span> : : #if __cplusplus >= 201703L</a>
|
||
|
<a name="6854"><span class="lineNum"> 6854 </span> : : namespace __detail::__variant</a>
|
||
|
<a name="6855"><span class="lineNum"> 6855 </span> : : {</a>
|
||
|
<a name="6856"><span class="lineNum"> 6856 </span> : : template<typename> struct _Never_valueless_alt; // see <variant></a>
|
||
|
<a name="6857"><span class="lineNum"> 6857 </span> : : </a>
|
||
|
<a name="6858"><span class="lineNum"> 6858 </span> : : // Provide the strong exception-safety guarantee when emplacing a</a>
|
||
|
<a name="6859"><span class="lineNum"> 6859 </span> : : // basic_string into a variant, but only if moving the string cannot throw.</a>
|
||
|
<a name="6860"><span class="lineNum"> 6860 </span> : : template<typename _Tp, typename _Traits, typename _Alloc></a>
|
||
|
<a name="6861"><span class="lineNum"> 6861 </span> : : struct _Never_valueless_alt<std::basic_string<_Tp, _Traits, _Alloc>></a>
|
||
|
<a name="6862"><span class="lineNum"> 6862 </span> : : : __and_<</a>
|
||
|
<a name="6863"><span class="lineNum"> 6863 </span> : : is_nothrow_move_constructible<std::basic_string<_Tp, _Traits, _Alloc>>,</a>
|
||
|
<a name="6864"><span class="lineNum"> 6864 </span> : : is_nothrow_move_assignable<std::basic_string<_Tp, _Traits, _Alloc>></a>
|
||
|
<a name="6865"><span class="lineNum"> 6865 </span> : : >::type</a>
|
||
|
<a name="6866"><span class="lineNum"> 6866 </span> : : { };</a>
|
||
|
<a name="6867"><span class="lineNum"> 6867 </span> : : } // namespace __detail::__variant</a>
|
||
|
<a name="6868"><span class="lineNum"> 6868 </span> : : #endif // C++17</a>
|
||
|
<a name="6869"><span class="lineNum"> 6869 </span> : : #endif // C++14</a>
|
||
|
<a name="6870"><span class="lineNum"> 6870 </span> : : </a>
|
||
|
<a name="6871"><span class="lineNum"> 6871 </span> : : _GLIBCXX_END_NAMESPACE_VERSION</a>
|
||
|
<a name="6872"><span class="lineNum"> 6872 </span> : : } // namespace std</a>
|
||
|
<a name="6873"><span class="lineNum"> 6873 </span> : : </a>
|
||
|
<a name="6874"><span class="lineNum"> 6874 </span> : : #endif // C++11</a>
|
||
|
<a name="6875"><span class="lineNum"> 6875 </span> : : </a>
|
||
|
<a name="6876"><span class="lineNum"> 6876 </span> : : #endif /* _BASIC_STRING_H */</a>
|
||
|
</pre>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<br>
|
||
|
|
||
|
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||
|
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
|
||
|
<tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.14</a></td></tr>
|
||
|
</table>
|
||
|
<br>
|
||
|
|
||
|
</body>
|
||
|
</html>
|