Lines Matching refs:this

17 // with this library; see the file COPYING.  If not, write to the Free
21 // As a special exception, you may use this file as part of a free software
23 // templates or use macros or inline functions from this file, or you compile
24 // this file and link it with other files to produce an executable, this
86 if (__pos > this->size())
94 if (this->max_size() - (this->size() - __n1) < __n2)
102 const bool __testoff = __off < this->size() - __pos;
103 return __testoff ? __off : this->size() - __pos;
110 return (std::less<const _CharT*>()(__s, this->_M_data())
111 || std::less<const _CharT*>()(this->_M_data()
112 + this->size(), __s));
119 { return iterator(this->_M_data()); }
123 { return iterator(this->_M_data() + this->_M_length()); }
228 * @brief Assign the value of @a str to this string.
233 { return this->assign(__str); }
236 * @brief Copy contents of @a s into this string.
241 { return this->assign(__s); }
247 * Assigning to a character makes this string length 1 and
248 * (*this)[0] == @a c.
253 this->assign(1, __c);
254 return *this;
265 this->_M_leak();
266 return iterator(this->_M_data());
275 { return const_iterator(this->_M_data()); }
284 this->_M_leak();
285 return iterator(this->_M_data() + this->size());
294 { return const_iterator(this->_M_data() + this->size()); }
303 { return reverse_iterator(this->end()); }
312 { return const_reverse_iterator(this->end()); }
321 { return reverse_iterator(this->begin()); }
330 { return const_reverse_iterator(this->begin()); }
338 { return this->_M_length(); }
344 { return this->_M_length(); }
349 { return this->_M_max_size(); }
371 * are default-constructed. For basic types such as char, this means
376 { this->resize(__n, _CharT()); }
384 { return this->_M_capacity(); }
397 * The advantage of this function is that if optimal code is a
405 { this->_M_reserve(__res_arg); }
412 { this->_M_clear(); }
415 * Returns true if the %string is empty. Equivalent to *this == "".
419 { return this->size() == 0; }
428 * Note that data access with this operator is unchecked and
435 _GLIBCXX_DEBUG_ASSERT(__pos <= this->size());
436 return this->_M_data()[__pos];
445 * Note that data access with this operator is unchecked and
453 _GLIBCXX_DEBUG_ASSERT(__pos <= this->size());
455 _GLIBCXX_DEBUG_PEDASSERT(__pos < this->size());
456 this->_M_leak();
457 return this->_M_data()[__pos];
473 if (__n >= this->size())
475 return this->_M_data()[__n];
492 if (__n >= this->size())
494 this->_M_leak();
495 return this->_M_data()[__n];
500 * @brief Append a string to this string.
502 * @return Reference to this string.
506 { return this->append(__str); }
511 * @return Reference to this string.
515 { return this->append(__s); }
520 * @return Reference to this string.
525 this->push_back(__c);
526 return *this;
530 * @brief Append a string to this string.
532 * @return Reference to this string.
543 * @return Reference to this string.
547 * to this string. If @a n is is larger than the number of available
560 * @return Reference to this string.
573 * @return Reference to this string.
588 * @return Reference to this string.
590 * Appends n copies of c to this string.
594 { return _M_replace_aux(this->size(), size_type(0), __n, __c); }
600 * @return Reference to this string.
602 * Appends characters in the range [first,last) to this string.
607 { return this->replace(_M_iend(), _M_iend(), __first, __last); }
616 const size_type __size = this->size();
617 if (__size + 1 > this->capacity() || this->_M_is_shared())
618 this->_M_mutate(__size, size_type(0), 0, size_type(1));
619 traits_type::assign(this->_M_data()[__size], __c);
620 this->_M_set_length(__size + 1);
626 * @return Reference to this string.
631 this->_M_assign(__str);
632 return *this;
640 * @return Reference to this string.
643 * This function sets this string to the substring of @a str consisting
649 { return _M_replace(size_type(0), this->size(), __str._M_data()
657 * @return Reference to this string.
659 * This function sets the value of this string to the first @a n
667 return _M_replace(size_type(0), this->size(), __s, __n);
673 * @return Reference to this string.
675 * This function sets the value of this string to the value of @a s.
683 return _M_replace(size_type(0), this->size(), __s,
691 * @return Reference to this string.
693 * This function sets the value of this string to @a n copies of
698 { return _M_replace_aux(size_type(0), this->size(), __n, __c); }
704 * @return Reference to this string.
711 { return this->replace(_M_ibegin(), _M_iend(), __first, __last); }
727 { this->replace(__p, __p, __n, __c); }
743 { this->replace(__p, __p, __beg, __end); }
749 * @return Reference to this string.
758 { return this->replace(__pos1, size_type(0),
767 * @return Reference to this string.
775 * this string or @a pos2 is beyond the end of @a str, out_of_range is
782 { return this->replace(__pos1, size_type(0), __str._M_data()
791 * @return Reference to this string.
793 * @throw std::out_of_range If @a pos is beyond the end of this
804 { return this->replace(__pos, size_type(0), __s, __n); }
810 * @return Reference to this string.
812 * @throw std::out_of_range If @a pos is beyond the end of this
825 return this->replace(__pos, size_type(0), __s,
834 * @return Reference to this string.
836 * @throw std::out_of_range If @a pos is beyond the end of this
868 this->_M_set_leaked();
869 return iterator(this->_M_data() + __pos);
876 * @return Reference to this string.
877 * @throw std::out_of_range If @a pos is beyond the end of this
880 * Removes @a n characters from this string starting at @a pos. The
889 this->_M_erase(_M_check(__pos, "__versa_string::erase"),
891 return *this;
899 * Removes the character at @a position from this string. The value
908 this->_M_erase(__pos, size_type(1));
909 this->_M_set_leaked();
910 return iterator(this->_M_data() + __pos);
919 * Removes the characters in the range [first,last) from this string.
928 this->_M_erase(__pos, __last - __first);
929 this->_M_set_leaked();
930 return iterator(this->_M_data() + __pos);
938 * @return Reference to this string.
939 * @throw std::out_of_range If @a pos is beyond the end of this
943 * Removes the characters in the range [pos,pos+n) from this string.
951 { return this->replace(__pos, __n, __str._M_data(), __str.size()); }
960 * @return Reference to this string.
965 * Removes the characters in the range [pos1,pos1 + n) from this
975 return this->replace(__pos1, __n1, __str._M_data()
987 * @return Reference to this string.
991 * Removes the characters in the range [pos,pos + n1) from this string.
1012 * @return Reference to this string.
1016 * Removes the characters in the range [pos,pos + n1) from this string.
1026 return this->replace(__pos, __n1, __s, traits_type::length(__s));
1035 * @return Reference to this string.
1039 * Removes the characters in the range [pos,pos + n1) from this string.
1055 * @return Reference to this string.
1065 { return this->replace(__i1, __i2, __str._M_data(), __str.size()); }
1073 * @return Reference to this string.
1086 return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n);
1094 * @return Reference to this string.
1106 return this->replace(__i1, __i2, __s, traits_type::length(__s));
1115 * @return Reference to this string.
1137 * @return Reference to this string.
1165 return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
1176 return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
1186 return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
1197 return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
1244 * Exchanges the contents of this string with that of @a s in constant
1249 { this->_M_swap(__s); }
1260 { return this->_M_data(); }
1270 { return this->_M_data(); }
1273 * @brief Return copy of allocator used to construct this string.
1277 { return this->_M_get_allocator(); }
1287 * in @a s within this string. If found, returns the index where it
1300 * this string. If found, returns the index where it begins. If not
1305 { return this->find(__str.data(), __pos, __str.size()); }
1314 * this string. If found, returns the index where it begins. If not
1321 return this->find(__s, __pos, traits_type::length(__s));
1330 * Starting from @a pos, searches forward for @a c within this string.
1344 * this string. If found, returns the index where it begins. If not
1349 { return this->rfind(__str.data(), __pos, __str.size()); }
1359 * characters in @a s within this string. If found, returns the index
1372 * this string. If found, returns the index where it begins. If not
1379 return this->rfind(__s, __pos, traits_type::length(__s));
1388 * Starting from @a pos, searches backward for @a c within this string.
1402 * @a str within this string. If found, returns the index where it was
1407 { return this->find_first_of(__str.data(), __pos, __str.size()); }
1417 * characters of @a s within this string. If found, returns the index
1430 * @a s within this string. If found, returns the index where it was
1437 return this->find_first_of(__s, __pos, traits_type::length(__s));
1447 * this string. If found, returns the index where it was found. If
1454 { return this->find(__c, __pos); }
1463 * @a str within this string. If found, returns the index where it was
1468 { return this->find_last_of(__str.data(), __pos, __str.size()); }
1478 * characters of @a s within this string. If found, returns the index
1491 * @a s within this string. If found, returns the index where it was
1498 return this->find_last_of(__s, __pos, traits_type::length(__s));
1507 * Starting from @a pos, searches backward for @a c within this string.
1515 { return this->rfind(__c, __pos); }
1524 * in @a str within this string. If found, returns the index where it
1529 { return this->find_first_not_of(__str.data(), __pos, __str.size()); }
1539 * in the first @a n characters of @a s within this string. If found,
1553 * in @a s within this string. If found, returns the index where it
1560 return this->find_first_not_of(__s, __pos, traits_type::length(__s));
1570 * within this string. If found, returns the index where it was found.
1583 * contained in @a str within this string. If found, returns the index
1589 { return this->find_last_not_of(__str.data(), __pos, __str.size()); }
1599 * contained in the first @a n characters of @a s within this string.
1613 * contained in @a s within this string. If found, returns the index
1620 return this->find_last_not_of(__s, __pos, traits_type::length(__s));
1630 * @a c within this string. If found, returns the index where it was
1651 return __versa_string(*this, _M_check(__pos, "__versa_string::substr"),
1660 * Returns an integer < 0 if this string is ordered before @a str, 0 if
1661 * their values are equivalent, or > 0 if this string is ordered after
1671 if (this->_M_compare(__str))
1674 const size_type __size = this->size();
1678 int __r = traits_type::compare(this->_M_data(), __str.data(), __len);
1691 * Form the substring of this string from the @a n characters starting
1714 * Form the substring of this string from the @a n1 characters starting
1716 * starting at @a pos2. Returns an integer < 0 if this substring is
1718 * equivalent, or > 0 if this substring is ordered after the substring
1735 * Returns an integer < 0 if this string is ordered before @a s, 0 if
1736 * their values are equivalent, or > 0 if this string is ordered after
1756 * Form the substring of this string from the @a n1 characters starting
1778 * Form the substring of this string from the @a n1 characters starting
1780 * Returns an integer < 0 if this substring is ordered before the string
1781 * from @a s, 0 if their values are equivalent, or > 0 if this substring