insert(pos, s, pos1, n1). basic_string& replace(size_type pos, size_type n, const charT* s, size_type n1) Equivalent to erase(pos, n) followed by insert(pos, s, n1). basic_string& replace(size_type pos, size_type n, const charT* s) Equivalent to erase(pos, n) followed by insert(pos, s). basic_string& replace(size_type pos, size_type n, size_type n1, charT c) Equivalent to erase(pos, n) followed by insert(pos, n1, c). basic_string& replace(iterator first, iterator last, const basic_string& s) Equivalent to insert(erase(first, last), s.begin(), s.end()) . basic_string& replace(iterator first, iterator last, const charT* s, size_type n) Equivalent to insert(erase(first, last), s, s + n). basic_string& replace(iterator first, iterator last, const charT* s) Equivalent to insert(erase(first, last), s, s + traits::length(s)) . basic_string& replace(iterator first, iterator last, size_type n, charT c) Equivalent to insert(erase(first, last), n, c). template<class InputIterator> basic_string& replace(iterator first, iterator last, InputIterator f, InputIterator l) Equivalent to insert(erase(first, last), f, l). size_type copy(charT* buf, size_type n, size_type pos = 0) const Copies at most n characters from *this to a character array. Throws out_of_range if pos > size(). Otherwise, equivalent to copy(begin() + pos, begin() + pos + min(n, size()), buf). Note that this member function does nothing other than copy characters from *this to buf; in particular, it does not terminate buf with a null character. size_type find(const basic_string& s, size_type pos = 0) const Searches for s as a substring of *this, beginning at character position pos. It is almost the same as search, except that search tests elements for equality using operator== or a user-provided function object, while this member function uses traits::eq. Returns the lowest character position N such that pos <= N and pos + s.size() <= size() and such that, for every i less than s.size(), (*this)[N + i] compares equal to s[i]. Returns npos if no such position N exists. Note that it is legal to call this member function with arguments such that s.size() > size() – pos, but such a search will always fail. size_type find(const charT* s, size_type pos, size_type n) const Searches for the first n characters of s as a substring of *this, beginning at character pos of *this. This is equivalent to find (basic_string(s, n), pos). size_type find(const charT* s, size_type pos = 0) const Searches for a null-terminated character array as a substring of *this, beginning at character pos of *this. This is equivalent to find(basic_string(s), pos). size_type find(charT c, size_type pos = 0) const Searches for the character c, beginning at character position pos. That is, returns the first character position N greater than or equal to pos, and less than size(), such that (*this)[N] compares equal to c. Returns npos if no such character position N exists. size_type rfind(const basic_string& s, size_type pos = npos) const Searches backward for s as a substring of *this. It is almost the same as find_end, except that find_end tests elements for equality using operator== or a user-provided function object, while this member function uses traits::eq. This member
Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату