Home | History | Annotate | Download | only in bits

Lines Matching refs:__pos

321       _M_check(size_type __pos, const char* __s) const
323 if (__pos > this->size())
324 __throw_out_of_range_fmt(__N("%s: __pos (which is %zu) > "
326 __s, __pos, this->size());
327 return __pos;
337 // NB: _M_limit doesn't check for a bad __pos value.
339 _M_limit(size_type __pos, size_type __off) const _GLIBCXX_NOEXCEPT
341 const bool __testoff = __off < this->size() - __pos;
342 return __testoff ? __off : this->size() - __pos;
425 _M_mutate(size_type __pos, size_type __len1, size_type __len2);
464 * @param __pos Index of first character to copy from.
467 basic_string(const basic_string& __str, size_type __pos,
472 * @param __pos Index of first character to copy from.
476 basic_string(const basic_string& __str, size_type __pos,
827 * @param __pos The index of the character to access.
836 operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT
838 _GLIBCXX_DEBUG_ASSERT(__pos <= size());
839 return _M_data()[__pos];
844 * @param __pos The index of the character to access.
853 operator[](size_type __pos)
857 _GLIBCXX_DEBUG_ASSERT(__pos <= size());
859 _GLIBCXX_DEBUG_PEDASSERT(__cplusplus >= 201103L || __pos < size());
861 return _M_data()[__pos];
995 * @param __pos Index of the first character of str to append.
998 * @throw std::out_of_range if @a __pos is not a valid index.
1001 * starting at @a __pos to this string. If @a __n is is larger
1006 append(const basic_string& __str, size_type __pos, size_type __n);
1107 * @param __pos Index of the first character of str.
1113 * consisting of @a __n characters at @a __pos. If @a __n is
1118 assign(const basic_string& __str, size_type __pos, size_type __n)
1120 + __str._M_check(__pos, "basic_string::assign"),
1121 __str._M_limit(__pos, __n)); }
1281 * @param __pos Iterator referencing location in string to insert at.
1286 * @throw std::out_of_range If @a __pos is beyond the end of this
1290 * __pos. If adding characters causes the length to exceed
1291 * max_size(), length_error is thrown. If @a __pos is beyond
1296 insert(size_type __pos, const _CharT* __s, size_type __n);
1300 * @param __pos Iterator referencing location in string to insert at.
1307 * Inserts the first @a n characters of @a __s starting at @a __pos. If
1309 * length_error is thrown. If @a __pos is beyond end(), out_of_range is
1314 insert(size_type __pos, const _CharT* __s)
1317 return this->insert(__pos, __s, traits_type::length(__s));
1322 * @param __pos Index in string to insert at.
1327 * @throw std::out_of_range If @a __pos is beyond the end of this
1331 * @a __pos. If adding characters causes the length to exceed
1332 * max_size(), length_error is thrown. If @a __pos > length(),
1337 insert(size_type __pos, size_type __n, _CharT __c)
1338 { return _M_replace_aux(_M_check(__pos, "basic_string::insert"),
1358 const size_type __pos = __p - _M_ibegin();
1359 _M_replace_aux(__pos, size_type(0), size_type(1), __c);
1361 return iterator(_M_data() + __pos);
1366 * @param __pos Index of first character to remove (default 0).
1373 * __pos. The length of the string is reduced by @a __n. If
1380 erase(size_type __pos = 0, size_type __n = npos)
1382 _M_mutate(_M_check(__pos, "basic_string::erase"),
1383 _M_limit(__pos, __n), size_type(0));
1400 const size_type __pos = __position - _M_ibegin();
1401 _M_mutate(__pos, size_type(1), size_type(0));
1403 return iterator(_M_data() + __pos);
1431 * @param __pos Index of first character to replace.
1439 * Removes the characters in the range [__pos,__pos+__n) from
1441 * If @a __pos is beyond end of string, out_of_range is thrown.
1447 replace(size_type __pos, size_type __n, const basic_string& __str)
1448 { return this->replace(__pos, __n, __str._M_data(), __str.size()); }
1463 * string. In place, the value of @a __str is inserted. If @a __pos is
1477 * @param __pos Index of first character to replace.
1485 * Removes the characters in the range [__pos,__pos + __n1)
1488 * @a __pos is beyond end of string, out_of_range is thrown. If
1494 replace(size_type __pos, size_type __n1, const _CharT* __s,
1499 * @param __pos Index of first character to replace.
1506 * Removes the characters in the range [__pos,__pos + __n1)
1508 * inserted. If @a __pos is beyond end of string, out_of_range
1514 replace(size_type __pos, size_type __n1, const _CharT* __s)
1517 return this->replace(__pos, __n1, __s, traits_type::length(__s));
1522 * @param __pos Index of first character to replace.
1527 * @throw std::out_of_range If @a __pos > size().
1532 * If @a __pos is beyond end of string, out_of_range is thrown.
1538 replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
1539 { return _M_replace_aux(_M_check(__pos, "basic_string::replace"),
1540 _M_limit(__pos, __n1), __n2, __c); }
1789 * @param __pos Index of first character to copy.
1791 * @throw std::out_of_range If __pos > size().
1793 * Copies up to @a __n characters starting at @a __pos into the
1794 * C string @a __s. If @a __pos is %greater than size(),
1798 copy(_CharT* __s, size_type __n, size_type __pos = 0) const;
1842 * @param __pos Index of character to search from.
1846 * Starting from @a __pos, searches forward for the first @a
1852 find(const _CharT* __s, size_type __pos, size_type __n) const;
1857 * @param __pos Index of character to search from (default 0).
1860 * Starting from @a __pos, searches forward for value of @a __str within
1865 find(const basic_string& __str, size_type __pos = 0) const
1867 { return this->find(__str.data(), __pos, __str.size()); }
1872 * @param __pos Index of character to search from (default 0).
1875 * Starting from @a __pos, searches forward for the value of @a
1880 find(const _CharT* __s, size_type __pos = 0) const
1883 return this->find(__s, __pos, traits_type::length(__s));
1889 * @param __pos Index of character to search from (default 0).
1892 * Starting from @a __pos, searches forward for @a __c within
1897 find(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT;
1902 * @param __pos Index of character to search back from (default end).
1905 * Starting from @a __pos, searches backward for value of @a
1910 rfind(const basic_string& __str, size_type __pos = npos) const
1912 { return this->rfind(__str.data(), __pos, __str.size()); }
1917 * @param __pos Index of character to search back from.
1921 * Starting from @a __pos, searches backward for the first @a
1927 rfind(const _CharT* __s, size_type __pos, size_type __n) const;
1932 * @param __pos Index of character to start search at (default end).
1935 * Starting from @a __pos, searches backward for the value of
1940 rfind(const _CharT* __s, size_type __pos = npos) const
1943 return this->rfind(__s, __pos, traits_type::length(__s));
1949 * @param __pos Index of character to search back from (default end).
1952 * Starting from @a __pos, searches backward for @a __c within
1957 rfind(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT;
1962 * @param __pos Index of character to search from (default 0).
1965 * Starting from @a __pos, searches forward for one of the
1971 find_first_of(const basic_string& __str, size_type __pos = 0) const
1973 { return this->find_first_of(__str.data(), __pos, __str.size()); }
1978 * @param __pos Index of character to search from.
1982 * Starting from @a __pos, searches forward for one of the
1988 find_first_of(const _CharT* __s, size_type __pos, size_type __n) const;
1993 * @param __pos Index of character to search from (default 0).
1996 * Starting from @a __pos, searches forward for one of the
2001 find_first_of(const _CharT* __s, size_type __pos = 0) const
2004 return this->find_first_of(__s, __pos, traits_type::length(__s));
2010 * @param __pos Index of character to search from (default 0).
2013 * Starting from @a __pos, searches forward for the character
2017 * Note: equivalent to find(__c, __pos).
2020 find_first_of(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT
2021 { return this->find(__c, __pos); }
2026 * @param __pos Index of character to search back from (default end).
2029 * Starting from @a __pos, searches backward for one of the
2035 find_last_of(const basic_string& __str, size_type __pos = npos) const
2037 { return this->find_last_of(__str.data(), __pos, __str.size()); }
2042 * @param __pos Index of character to search back from.
2046 * Starting from @a __pos, searches backward for one of the
2052 find_last_of(const _CharT* __s, size_type __pos, size_type __n) const;
2057 * @param __pos Index of character to search back from (default end).
2060 * Starting from @a __pos, searches backward for one of the
2065 find_last_of(const _CharT* __s, size_type __pos = npos) const
2068 return this->find_last_of(__s, __pos, traits_type::length(__s));
2074 * @param __pos Index of character to search back from (default end).
2077 * Starting from @a __pos, searches backward for @a __c within
2081 * Note: equivalent to rfind(__c, __pos).
2084 find_last_of(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT
2085 { return this->rfind(__c, __pos); }
2090 * @param __pos Index of character to search from (default 0).
2093 * Starting from @a __pos, searches forward for a character not contained
2098 find_first_not_of(const basic_string& __str, size_type __pos = 0) const
2100 { return this->find_first_not_of(__str.data(), __pos, __str.size()); }
2105 * @param __pos Index of character to search from.
2109 * Starting from @a __pos, searches forward for a character not
2115 find_first_not_of(const _CharT* __s, size_type __pos,
2121 * @param __pos Index of character to search from (default 0).
2124 * Starting from @a __pos, searches forward for a character not
2129 find_first_not_of(const _CharT* __s, size_type __pos = 0) const
2132 return this->find_first_not_of(__s, __pos, traits_type::length(__s));
2138 * @param __pos Index of character to search from (default 0).
2141 * Starting from @a __pos, searches forward for a character
2146 find_first_not_of(_CharT __c, size_type __pos = 0) const
2152 * @param __pos Index of character to search back from (default end).
2155 * Starting from @a __pos, searches backward for a character
2161 find_last_not_of(const basic_string& __str, size_type __pos = npos) const
2163 { return this->find_last_not_of(__str.data(), __pos, __str.size()); }
2168 * @param __pos Index of character to search back from.
2172 * Starting from @a __pos, searches backward for a character not
2178 find_last_not_of(const _CharT* __s, size_type __pos,
2183 * @param __pos Index of character to search back from (default end).
2186 * Starting from @a __pos, searches backward for a character
2192 find_last_not_of(const _CharT* __s, size_type __pos = npos) const
2195 return this->find_last_not_of(__s, __pos, traits_type::length(__s));
2201 * @param __pos Index of character to search back from (default end).
2204 * Starting from @a __pos, searches backward for a character other than
2209 find_last_not_of(_CharT __c, size_type __pos = npos) const
2214 * @param __pos Index of first character (default 0).
2217 * @throw std::out_of_range If __pos > size().
2220 * characters starting at @a __pos. If the string is too
2221 * short, use the remainder of the characters. If @a __pos is
2225 substr(size_type __pos = 0, size_type __n = npos) const
2227 _M_check(__pos, "basic_string::substr"), __n); }
2258 * @param __pos Index of first character of substring.
2264 * starting at @a __pos. Returns an integer < 0 if the
2276 compare(size_type __pos, size_type __n, const basic_string& __str) const;
2326 * @param __pos Index of first character of substring.
2344 compare(size_type __pos, size_type __n1, const _CharT* __s) const;
2348 * @param __pos Index of first character of substring.
2355 * characters starting at @a __pos. Form a string from the
2371 compare(size_type __pos, size_type __n1, const _CharT* __s,