Lines Matching refs:__str

999 …CONSTEXPR_SINCE_CXX20 _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS basic_string(const basic_string& __str)
1000 …: __r_(__default_init_tag(), __alloc_traits::select_on_container_copy_construction(__str.__alloc()…
1001 if (!__str.__is_long()) {
1002 __r_.first() = __str.__r_.first();
1005 … __init_copy_ctor_external(std::__to_address(__str.__get_long_pointer()), __str.__get_long_size());
1009 basic_string(const basic_string& __str, const allocator_type& __a)
1011 if (!__str.__is_long()) {
1012 __r_.first() = __str.__r_.first();
1015 … __init_copy_ctor_external(std::__to_address(__str.__get_long_pointer()), __str.__get_long_size());
1019 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(basic_string&& __str)
1026 …// does not work consistently during initialization of __r_, so we instead unpoison __str's memory…
1027 // __str's memory needs to be unpoisoned only in the case where it's a short string.
1032 }(__str)) {
1033 __str.__r_.first() = __rep();
1034 __str.__annotate_new(0);
1039 …_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(basic_string&& __str, const alloc…
1041 if (__str.__is_long() && __a != __str.__alloc()) // copy, not move
1042 __init(std::__to_address(__str.__get_long_pointer()), __str.__get_long_size());
1046 if (!__str.__is_long())
1047 __str.__annotate_delete();
1048 __r_.first() = __str.__r_.first();
1049 __str.__r_.first() = __rep();
1050 __str.__annotate_new(0);
1051 if (!__is_long() && this != &__str)
1095 basic_string&& __str, size_type __pos, const _Allocator& __alloc = _Allocator())
1096 : basic_string(std::move(__str), __pos, npos, __alloc) {}
1099 … basic_string&& __str, size_type __pos, size_type __n, const _Allocator& __alloc = _Allocator())
1101 if (__pos > __str.size())
1104 auto __len = std::min<size_type>(__n, __str.size() - __pos);
1105 if (__alloc_traits::is_always_equal::value || __alloc == __str.__alloc()) {
1106 __move_assign(std::move(__str), __pos, __len);
1109 __init(__str.data() + __pos, __len);
1121 …basic_string(const basic_string& __str, size_type __pos, size_type __n, const _Allocator& __a = _A…
1123 size_type __str_sz = __str.size();
1126 __init(__str.data() + __pos, std::min(__n, __str_sz - __pos));
1130 basic_string(const basic_string& __str, size_type __pos, const _Allocator& __a = _Allocator())
1132 size_type __str_sz = __str.size();
1135 __init(__str.data() + __pos, __str_sz - __pos);
1220 operator=(const basic_string& __str);
1233 …operator=(basic_string&& __str) noexcept(__noexcept_move_assign_container<_Allocator, __alloc_trai…
1234 …__move_assign(__str, integral_constant<bool, __alloc_traits::propagate_on_container_move_assignmen…
1346 …P_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator+=(const basic_string& __str) {
1347 return append(__str);
1375 …IBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(const basic_string& __str) {
1376 return append(__str.data(), __str.size());
1389 …_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(const basic_string& __str, size_type __pos, siz…
1463 …_LIBCPP_HIDE_FROM_ABI constexpr void __move_assign(basic_string&& __str, size_type __pos, size_typ…
1464 // Pilfer the allocation from __str.
1465 …_LIBCPP_ASSERT_INTERNAL(__alloc() == __str.__alloc(), "__move_assign called with wrong allocator");
1466 size_type __old_sz = __str.size();
1467 if (!__str.__is_long())
1468 __str.__annotate_delete();
1469 __r_.first() = __str.__r_.first();
1470 __str.__r_.first() = __rep();
1471 __str.__annotate_new(0);
1485 …IBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& assign(const basic_string& __str) {
1486 return *this = __str;
1490 …assign(basic_string&& __str) noexcept(__noexcept_move_assign_container<_Allocator, __alloc_traits>…
1491 *this = std::move(__str);
1495 …_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& assign(const basic_string& __str, size_type __pos, siz…
1538 insert(size_type __pos1, const basic_string& __str) {
1539 return insert(__pos1, __str.data(), __str.size());
1557 insert(size_type __pos1, const basic_string& __str, size_type __pos2, size_type __n = npos);
1604 replace(size_type __pos1, size_type __n1, const basic_string& __str) {
1605 return replace(__pos1, __n1, __str.data(), __str.size());
1616 …replace(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type _…
1631 replace(const_iterator __i1, const_iterator __i2, const basic_string& __str) {
1633 …_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1), __str.data(), __str.size());
1695 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(basic_string& __str)
1717 find(const basic_string& __str, size_type __pos = 0) const _NOEXCEPT;
1729 rfind(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT;
1741 find_first_of(const basic_string& __str, size_type __pos = 0) const _NOEXCEPT;
1755 find_last_of(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT;
1769 find_first_not_of(const basic_string& __str, size_type __pos = 0) const _NOEXCEPT;
1783 find_last_not_of(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT;
1796 …_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 int compare(const basic_string& __str) const _…
1807 compare(size_type __pos1, size_type __n1, const basic_string& __str) const;
1809 …compare(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type _…
2141 …P_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __copy_assign_alloc(const basic_string& __str) {
2143__str, integral_constant<bool, __alloc_traits::propagate_on_container_copy_assignment::value>());
2146 …_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __copy_assign_alloc(const basic_string& __str, true_type) {
2147 if (__alloc() == __str.__alloc())
2148 __alloc() = __str.__alloc();
2150 if (!__str.__is_long()) {
2152 __alloc() = __str.__alloc();
2155 allocator_type __a = __str.__alloc();
2156 auto __allocation = std::__allocate_at_least(__a, __str.__get_long_cap());
2163 __set_long_size(__str.size());
2174 __move_assign(basic_string& __str, false_type) noexcept(__alloc_traits::is_always_equal::value);
2176 __move_assign(basic_string& __str, true_type)
2184 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __move_assign_alloc(basic_string& __str)
2188__str, integral_constant<bool, __alloc_traits::propagate_on_container_move_assignment::value>());
2650 basic_string<_CharT, _Traits, _Allocator>::operator=(const basic_string& __str) {
2651 if (this != std::addressof(__str)) {
2652 __copy_assign_alloc(__str);
2654 if (!__str.__is_long()) {
2656 if (__get_short_size() < __str.__get_short_size())
2657 __annotate_increase(__str.__get_short_size() - __get_short_size());
2658 __r_.first() = __str.__r_.first();
2662 return __assign_no_alias<true>(__str.data(), __str.size());
2665 return __assign_no_alias<false>(__str.data(), __str.size());
2675 basic_string& __str, false_type) noexcept(__alloc_traits::is_always_equal::value) {
2676 if (__alloc() != __str.__alloc())
2677 assign(__str);
2679 __move_assign(__str, true_type());
2684 basic_string<_CharT, _Traits, _Allocator>::__move_assign(basic_string& __str, true_type)
2702 size_type __str_old_size = __str.size();
2703 bool __str_was_short = !__str.__is_long();
2705 __move_assign_alloc(__str);
2706 __r_.first() = __str.__r_.first();
2707 __str.__set_short_size(0);
2708 traits_type::assign(__str.__get_short_pointer()[0], value_type());
2710 if (__str_was_short && this != &__str)
2711 __str.__annotate_shrink(__str_old_size);
2715 __str.__annotate_new(0);
2724 if (!__is_long() && &__str != this)
2725 // If it is long string, delete was never called on original __str's buffer.
2793 basic_string<_CharT, _Traits, _Allocator>::assign(const basic_string& __str, size_type __pos, size_…
2794 size_type __sz = __str.size();
2797 return assign(__str.data() + __pos, std::min(__n, __sz - __pos));
2940 basic_string<_CharT, _Traits, _Allocator>::append(const basic_string& __str, size_type __pos, size_…
2941 size_type __sz = __str.size();
2944 return append(__str.data() + __pos, std::min(__n, __sz - __pos));
3062 size_type __pos1, const basic_string& __str, size_type __pos2, size_type __n) {
3063 size_type __str_sz = __str.size();
3066 return insert(__pos1, __str.data() + __pos2, std::min(__n, __str_sz - __pos2));
3198 size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2) {
3199 size_type __str_sz = __str.size();
3202 return replace(__pos1, __n1, __str.data() + __pos2, std::min(__n2, __str_sz - __pos2));
3436 …CPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocator>::swap(basic_string& __str)
3445 __alloc() == __str.__alloc(),
3449 if (this != &__str && !__str.__is_long())
3450 __str.__annotate_delete();
3451 std::swap(__r_.first(), __str.__r_.first());
3452 std::__swap_allocator(__alloc(), __str.__alloc());
3455 if (this != &__str && !__str.__is_long())
3456 __str.__annotate_new(__str.__get_short_size());
3478 basic_string<_CharT, _Traits, _Allocator>::find(const basic_string& __str, size_type __pos) const _…
3479 …_find<value_type, size_type, traits_type, npos>(data(), size(), __str.data(), __pos, __str.size());
3516 basic_string<_CharT, _Traits, _Allocator>::rfind(const basic_string& __str, size_type __pos) const …
3517 …rfind<value_type, size_type, traits_type, npos>(data(), size(), __str.data(), __pos, __str.size());
3554 basic_string<_CharT, _Traits, _Allocator>::find_first_of(const basic_string& __str, size_type __pos…
3556 data(), size(), __str.data(), __pos, __str.size());
3594 basic_string<_CharT, _Traits, _Allocator>::find_last_of(const basic_string& __str, size_type __pos)…
3596 data(), size(), __str.data(), __pos, __str.size());
3635 const basic_string& __str, size_type __pos) const _NOEXCEPT {
3637 data(), size(), __str.data(), __pos, __str.size());
3676 const basic_string& __str, size_type __pos) const _NOEXCEPT {
3678 data(), size(), __str.data(), __pos, __str.size());
3724 basic_string<_CharT, _Traits, _Allocator>::compare(const basic_string& __str) const _NOEXCEPT {
3725 return compare(__self_view(__str));
3756 … _Traits, _Allocator>::compare(size_type __pos1, size_type __n1, const basic_string& __str) const {
3757 return compare(__pos1, __n1, __str.data(), __str.size());
3773 …size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2) con…
3774 return compare(__pos1, __n1, __self_view(__str), __pos2, __n2);
4177 _LIBCPP_EXPORTED_FROM_ABI int stoi(const string& __str, size_t* __idx = nullptr, int __base = 10);
4178 _LIBCPP_EXPORTED_FROM_ABI long stol(const string& __str, size_t* __idx = nullptr, int __base = 10);
4179 _LIBCPP_EXPORTED_FROM_ABI unsigned long stoul(const string& __str, size_t* __idx = nullptr, int __b…
4180 _LIBCPP_EXPORTED_FROM_ABI long long stoll(const string& __str, size_t* __idx = nullptr, int __base …
4181 _LIBCPP_EXPORTED_FROM_ABI unsigned long long stoull(const string& __str, size_t* __idx = nullptr, i…
4183 _LIBCPP_EXPORTED_FROM_ABI float stof(const string& __str, size_t* __idx = nullptr);
4184 _LIBCPP_EXPORTED_FROM_ABI double stod(const string& __str, size_t* __idx = nullptr);
4185 _LIBCPP_EXPORTED_FROM_ABI long double stold(const string& __str, size_t* __idx = nullptr);
4198 _LIBCPP_EXPORTED_FROM_ABI int stoi(const wstring& __str, size_t* __idx = nullptr, int __base = 10);
4199 _LIBCPP_EXPORTED_FROM_ABI long stol(const wstring& __str, size_t* __idx = nullptr, int __base = 10);
4200 _LIBCPP_EXPORTED_FROM_ABI unsigned long stoul(const wstring& __str, size_t* __idx = nullptr, int __…
4201 _LIBCPP_EXPORTED_FROM_ABI long long stoll(const wstring& __str, size_t* __idx = nullptr, int __base…
4202 _LIBCPP_EXPORTED_FROM_ABI unsigned long long stoull(const wstring& __str, size_t* __idx = nullptr, …
4204 _LIBCPP_EXPORTED_FROM_ABI float stof(const wstring& __str, size_t* __idx = nullptr);
4205 _LIBCPP_EXPORTED_FROM_ABI double stod(const wstring& __str, size_t* __idx = nullptr);
4206 _LIBCPP_EXPORTED_FROM_ABI long double stold(const wstring& __str, size_t* __idx = nullptr);
4252 …or<<(basic_ostream<_CharT, _Traits>& __os, const basic_string<_CharT, _Traits, _Allocator>& __str);
4256 operator>>(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Allocator>& __str);
4260 getline(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Allocator>& __str, _Ch…
4264 getline(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Allocator>& __str);
4268 getline(basic_istream<_CharT, _Traits>&& __is, basic_string<_CharT, _Traits, _Allocator>& __str, _C…
4272 getline(basic_istream<_CharT, _Traits>&& __is, basic_string<_CharT, _Traits, _Allocator>& __str);
4277 erase(basic_string<_CharT, _Traits, _Allocator>& __str, const _Up& __v) {
4278 auto __old_size = __str.size();
4279 __str.erase(std::remove(__str.begin(), __str.end(), __v), __str.end());
4280 return __old_size - __str.size();
4285 erase_if(basic_string<_CharT, _Traits, _Allocator>& __str, _Predicate __pred) {
4286 auto __old_size = __str.size();
4287 __str.erase(std::remove_if(__str.begin(), __str.end(), __pred), __str.end());
4288 return __old_size - __str.size();
4297 operator""s(const char* __str, size_t __len) {
4298 return basic_string<char>(__str, __len);
4303 operator""s(const wchar_t* __str, size_t __len) {
4304 return basic_string<wchar_t>(__str, __len);
4309 inline _LIBCPP_HIDE_FROM_ABI constexpr basic_string<char8_t> operator""s(const char8_t* __str, size…
4310 return basic_string<char8_t>(__str, __len);
4315 operator""s(const char16_t* __str, size_t __len) {
4316 return basic_string<char16_t>(__str, __len);
4320 operator""s(const char32_t* __str, size_t __len) {
4321 return basic_string<char32_t>(__str, __len);