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())
325 return __pos;
335 // NB: _M_limit doesn't check for a bad __pos value.
337 _M_limit(size_type __pos, size_type __off) const
339 const bool __testoff = __off < this->size() - __pos;
340 return __testoff ? __off : this->size() - __pos;
420 _M_mutate(size_type __pos, size_type __len1, size_type __len2);
459 * @param __pos Index of first character to copy from.
462 basic_string(const basic_string& __str, size_type __pos,
467 * @param __pos Index of first character to copy from.
471 basic_string(const basic_string& __str, size_type __pos,
817 * @param __pos The index of the character to access.
826 operator[] (size_type __pos) const
828 _GLIBCXX_DEBUG_ASSERT(__pos <= size());
829 return _M_data()[__pos];
834 * @param __pos The index of the character to access.
843 operator[](size_type __pos)
846 _GLIBCXX_DEBUG_ASSERT(__pos <= size());
848 _GLIBCXX_DEBUG_PEDASSERT(__pos < size());
850 return _M_data()[__pos];
978 * @param __pos Index of the first character of str to append.
981 * @throw std::out_of_range if @a __pos is not a valid index.
984 * starting at @a __pos to this string. If @a __n is is larger
989 append(const basic_string& __str, size_type __pos, size_type __n);
1089 * @param __pos Index of the first character of str.
1095 * consisting of @a __n characters at @a __pos. If @a __n is
1100 assign(const basic_string& __str, size_type __pos, size_type __n)
1102 + __str._M_check(__pos, "basic_string::assign"),
1103 __str._M_limit(__pos, __n)); }
1263 * @param __pos Iterator referencing location in string to insert at.
1268 * @throw std::out_of_range If @a __pos is beyond the end of this
1272 * __pos. If adding characters causes the length to exceed
1273 * max_size(), length_error is thrown. If @a __pos is beyond
1278 insert(size_type __pos, const _CharT* __s, size_type __n);
1282 * @param __pos Iterator referencing location in string to insert at.
1289 * Inserts the first @a n characters of @a __s starting at @a __pos. If
1291 * length_error is thrown. If @a __pos is beyond end(), out_of_range is
1296 insert(size_type __pos, const _CharT* __s)
1299 return this->insert(__pos, __s, traits_type::length(__s));
1304 * @param __pos Index in string to insert at.
1309 * @throw std::out_of_range If @a __pos is beyond the end of this
1313 * @a __pos. If adding characters causes the length to exceed
1314 * max_size(), length_error is thrown. If @a __pos > length(),
1319 insert(size_type __pos, size_type __n, _CharT __c)
1320 { return _M_replace_aux(_M_check(__pos, "basic_string::insert"),
1340 const size_type __pos = __p - _M_ibegin();
1341 _M_replace_aux(__pos, size_type(0), size_type(1), __c);
1343 return iterator(_M_data() + __pos);
1348 * @param __pos Index of first character to remove (default 0).
1355 * __pos. The length of the string is reduced by @a __n. If
1362 erase(size_type __pos = 0, size_type __n = npos)
1364 _M_mutate(_M_check(__pos, "basic_string::erase"),
1365 _M_limit(__pos, __n), size_type(0));
1382 const size_type __pos = __position - _M_ibegin();
1383 _M_mutate(__pos, size_type(1), size_type(0));
1385 return iterator(_M_data() + __pos);
1413 * @param __pos Index of first character to replace.
1421 * Removes the characters in the range [__pos,__pos+__n) from
1423 * If @a __pos is beyond end of string, out_of_range is thrown.
1429 replace(size_type __pos, size_type __n, const basic_string& __str)
1430 { return this->replace(__pos, __n, __str._M_data(), __str.size()); }
1445 * string. In place, the value of @a __str is inserted. If @a __pos is
1459 * @param __pos Index of first character to replace.
1467 * Removes the characters in the range [__pos,__pos + __n1)
1470 * @a __pos is beyond end of string, out_of_range is thrown. If
1476 replace(size_type __pos, size_type __n1, const _CharT* __s,
1481 * @param __pos Index of first character to replace.
1488 * Removes the characters in the range [__pos,__pos + __n1)
1490 * inserted. If @a __pos is beyond end of string, out_of_range
1496 replace(size_type __pos, size_type __n1, const _CharT* __s)
1499 return this->replace(__pos, __n1, __s, traits_type::length(__s));
1504 * @param __pos Index of first character to replace.
1509 * @throw std::out_of_range If @a __pos > size().
1514 * If @a __pos is beyond end of string, out_of_range is thrown.
1520 replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
1521 { return _M_replace_aux(_M_check(__pos, "basic_string::replace"),
1522 _M_limit(__pos, __n1), __n2, __c); }
1771 * @param __pos Index of first character to copy.
1773 * @throw std::out_of_range If __pos > size().
1775 * Copies up to @a __n characters starting at @a __pos into the
1776 * C string @a __s. If @a __pos is %greater than size(),
1780 copy(_CharT* __s, size_type __n, size_type __pos = 0) const;
1823 * @param __pos Index of character to search from.
1827 * Starting from @a __pos, searches forward for the first @a
1833 find(const _CharT* __s, size_type __pos, size_type __n) const;
1838 * @param __pos Index of character to search from (default 0).
1841 * Starting from @a __pos, searches forward for value of @a __str within
1846 find(const basic_string& __str, size_type __pos = 0) const
1848 { return this->find(__str.data(), __pos, __str.size()); }
1853 * @param __pos Index of character to search from (default 0).
1856 * Starting from @a __pos, searches forward for the value of @a
1861 find(const _CharT* __s, size_type __pos = 0) const
1864 return this->find(__s, __pos, traits_type::length(__s));
1870 * @param __pos Index of character to search from (default 0).
1873 * Starting from @a __pos, searches forward for @a __c within
1878 find(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT;
1883 * @param __pos Index of character to search back from (default end).
1886 * Starting from @a __pos, searches backward for value of @a
1891 rfind(const basic_string& __str, size_type __pos = npos) const
1893 { return this->rfind(__str.data(), __pos, __str.size()); }
1898 * @param __pos Index of character to search back from.
1902 * Starting from @a __pos, searches backward for the first @a
1908 rfind(const _CharT* __s, size_type __pos, size_type __n) const;
1913 * @param __pos Index of character to start search at (default end).
1916 * Starting from @a __pos, searches backward for the value of
1921 rfind(const _CharT* __s, size_type __pos = npos) const
1924 return this->rfind(__s, __pos, traits_type::length(__s));
1930 * @param __pos Index of character to search back from (default end).
1933 * Starting from @a __pos, searches backward for @a __c within
1938 rfind(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT;
1943 * @param __pos Index of character to search from (default 0).
1946 * Starting from @a __pos, searches forward for one of the
1952 find_first_of(const basic_string& __str, size_type __pos = 0) const
1954 { return this->find_first_of(__str.data(), __pos, __str.size()); }
1959 * @param __pos Index of character to search from.
1963 * Starting from @a __pos, searches forward for one of the
1969 find_first_of(const _CharT* __s, size_type __pos, size_type __n) const;
1974 * @param __pos Index of character to search from (default 0).
1977 * Starting from @a __pos, searches forward for one of the
1982 find_first_of(const _CharT* __s, size_type __pos = 0) const
1985 return this->find_first_of(__s, __pos, traits_type::length(__s));
1991 * @param __pos Index of character to search from (default 0).
1994 * Starting from @a __pos, searches forward for the character
1998 * Note: equivalent to find(__c, __pos).
2001 find_first_of(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT
2002 { return this->find(__c, __pos); }
2007 * @param __pos Index of character to search back from (default end).
2010 * Starting from @a __pos, searches backward for one of the
2016 find_last_of(const basic_string& __str, size_type __pos = npos) const
2018 { return this->find_last_of(__str.data(), __pos, __str.size()); }
2023 * @param __pos Index of character to search back from.
2027 * Starting from @a __pos, searches backward for one of the
2033 find_last_of(const _CharT* __s, size_type __pos, size_type __n) const;
2038 * @param __pos Index of character to search back from (default end).
2041 * Starting from @a __pos, searches backward for one of the
2046 find_last_of(const _CharT* __s, size_type __pos = npos) const
2049 return this->find_last_of(__s, __pos, traits_type::length(__s));
2055 * @param __pos Index of character to search back from (default end).
2058 * Starting from @a __pos, searches backward for @a __c within
2062 * Note: equivalent to rfind(__c, __pos).
2065 find_last_of(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT
2066 { return this->rfind(__c, __pos); }
2071 * @param __pos Index of character to search from (default 0).
2074 * Starting from @a __pos, searches forward for a character not contained
2079 find_first_not_of(const basic_string& __str, size_type __pos = 0) const
2081 { return this->find_first_not_of(__str.data(), __pos, __str.size()); }
2086 * @param __pos Index of character to search from.
2090 * Starting from @a __pos, searches forward for a character not
2096 find_first_not_of(const _CharT* __s, size_type __pos,
2102 * @param __pos Index of character to search from (default 0).
2105 * Starting from @a __pos, searches forward for a character not
2110 find_first_not_of(const _CharT* __s, size_type __pos = 0) const
2113 return this->find_first_not_of(__s, __pos, traits_type::length(__s));
2119 * @param __pos Index of character to search from (default 0).
2122 * Starting from @a __pos, searches forward for a character
2127 find_first_not_of(_CharT __c, size_type __pos = 0) const
2133 * @param __pos Index of character to search back from (default end).
2136 * Starting from @a __pos, searches backward for a character
2142 find_last_not_of(const basic_string& __str, size_type __pos = npos) const
2144 { return this->find_last_not_of(__str.data(), __pos, __str.size()); }
2149 * @param __pos Index of character to search back from.
2153 * Starting from @a __pos, searches backward for a character not
2159 find_last_not_of(const _CharT* __s, size_type __pos,
2164 * @param __pos Index of character to search back from (default end).
2167 * Starting from @a __pos, searches backward for a character
2173 find_last_not_of(const _CharT* __s, size_type __pos = npos) const
2176 return this->find_last_not_of(__s, __pos, traits_type::length(__s));
2182 * @param __pos Index of character to search back from (default end).
2185 * Starting from @a __pos, searches backward for a character other than
2190 find_last_not_of(_CharT __c, size_type __pos = npos) const
2195 * @param __pos Index of first character (default 0).
2198 * @throw std::out_of_range If __pos > size().
2201 * characters starting at @a __pos. If the string is too
2202 * short, use the remainder of the characters. If @a __pos is
2206 substr(size_type __pos = 0, size_type __n = npos) const
2208 _M_check(__pos, "basic_string::substr"), __n); }
2239 * @param __pos Index of first character of substring.
2245 * starting at @a __pos
2257 compare(size_type __pos, size_type __n, const basic_string& __str) const;
2307 * @param __pos Index of first character of substring.
2325 compare(size_type __pos, size_type __n1, const _CharT* __s) const;
2329 * @param __pos Index of first character of substring.
2336 * characters starting at @a __pos. Form a string from the
2352 compare(size_type __pos, size_type __n1, const _CharT* __s,