Lines Matching refs:__str
896 …CONSTEXPR_SINCE_CXX20 _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS basic_string(const basic_string& __str)
897 …: __r_(__default_init_tag(), __alloc_traits::select_on_container_copy_construction(__str.__alloc()…
898 if (!__str.__is_long()) {
899 __r_.first() = __str.__r_.first();
902 … __init_copy_ctor_external(std::__to_address(__str.__get_long_pointer()), __str.__get_long_size());
906 basic_string(const basic_string& __str, const allocator_type& __a)
908 if (!__str.__is_long()) {
909 __r_.first() = __str.__r_.first();
912 … __init_copy_ctor_external(std::__to_address(__str.__get_long_pointer()), __str.__get_long_size());
916 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(basic_string&& __str)
923 …// does not work consistently during initialization of __r_, so we instead unpoison __str's memory…
924 // __str's memory needs to be unpoisoned only in the case where it's a short string.
925 …__s.__r_)&& { if(!__s.__is_long()) __s.__annotate_delete(); return std::move(__s.__r_); }(__str)) {
926 __str.__r_.first() = __rep();
927 __str.__annotate_new(0);
932 …_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(basic_string&& __str, const alloc…
934 if (__str.__is_long() && __a != __str.__alloc()) // copy, not move
935 __init(std::__to_address(__str.__get_long_pointer()), __str.__get_long_size());
939 if (!__str.__is_long())
940 __str.__annotate_delete();
941 __r_.first() = __str.__r_.first();
942 __str.__r_.first() = __rep();
943 __str.__annotate_new(0);
944 if (!__is_long() && this != &__str)
988 basic_string&& __str, size_type __pos, const _Allocator& __alloc = _Allocator())
989 : basic_string(std::move(__str), __pos, npos, __alloc) {}
992 … basic_string&& __str, size_type __pos, size_type __n, const _Allocator& __alloc = _Allocator())
994 if (__pos > __str.size())
997 auto __len = std::min<size_type>(__n, __str.size() - __pos);
998 if (__alloc_traits::is_always_equal::value || __alloc == __str.__alloc()) {
999 __move_assign(std::move(__str), __pos, __len);
1002 __init(__str.data() + __pos, __len);
1014 …basic_string(const basic_string& __str, size_type __pos, size_type __n, const _Allocator& __a = _A…
1016 size_type __str_sz = __str.size();
1019 __init(__str.data() + __pos, std::min(__n, __str_sz - __pos));
1023 basic_string(const basic_string& __str, size_type __pos, const _Allocator& __a = _Allocator())
1025 size_type __str_sz = __str.size();
1028 __init(__str.data() + __pos, __str_sz - __pos);
1113 operator=(const basic_string& __str);
1125 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator=(basic_string&& __str)
1127 …__move_assign(__str, integral_constant<bool, __alloc_traits::propagate_on_container_move_assignmen…
1239 …P_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator+=(const basic_string& __str) {
1240 return append(__str);
1268 …IBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(const basic_string& __str) {
1269 return append(__str.data(), __str.size());
1282 …_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(const basic_string& __str, size_type __pos, siz…
1356 …_LIBCPP_HIDE_FROM_ABI constexpr void __move_assign(basic_string&& __str, size_type __pos, size_typ…
1357 // Pilfer the allocation from __str.
1358 …_LIBCPP_ASSERT_INTERNAL(__alloc() == __str.__alloc(), "__move_assign called with wrong allocator");
1359 size_type __old_sz = __str.size();
1360 if (!__str.__is_long())
1361 __str.__annotate_delete();
1362 __r_.first() = __str.__r_.first();
1363 __str.__r_.first() = __rep();
1364 __str.__annotate_new(0);
1378 …IBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& assign(const basic_string& __str) {
1379 return *this = __str;
1382 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& assign(basic_string&& __str)
1384 *this = std::move(__str);
1388 …_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& assign(const basic_string& __str, size_type __pos, siz…
1431 insert(size_type __pos1, const basic_string& __str) {
1432 return insert(__pos1, __str.data(), __str.size());
1450 insert(size_type __pos1, const basic_string& __str, size_type __pos2, size_type __n = npos);
1497 replace(size_type __pos1, size_type __n1, const basic_string& __str) {
1498 return replace(__pos1, __n1, __str.data(), __str.size());
1509 …replace(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type _…
1524 replace(const_iterator __i1, const_iterator __i2, const basic_string& __str) {
1526 …_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1), __str.data(), __str.size());
1588 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(basic_string& __str)
1610 find(const basic_string& __str, size_type __pos = 0) const _NOEXCEPT;
1622 rfind(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT;
1634 find_first_of(const basic_string& __str, size_type __pos = 0) const _NOEXCEPT;
1648 find_last_of(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT;
1662 find_first_not_of(const basic_string& __str, size_type __pos = 0) const _NOEXCEPT;
1676 find_last_not_of(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT;
1689 …_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 int compare(const basic_string& __str) const _…
1700 compare(size_type __pos1, size_type __n1, const basic_string& __str) const;
1702 …compare(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type _…
2021 …P_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __copy_assign_alloc(const basic_string& __str) {
2023 … __str, integral_constant<bool, __alloc_traits::propagate_on_container_copy_assignment::value>());
2026 …_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __copy_assign_alloc(const basic_string& __str, true_type) {
2027 if (__alloc() == __str.__alloc())
2028 __alloc() = __str.__alloc();
2030 if (!__str.__is_long()) {
2032 __alloc() = __str.__alloc();
2035 allocator_type __a = __str.__alloc();
2036 auto __allocation = std::__allocate_at_least(__a, __str.__get_long_cap());
2043 __set_long_size(__str.size());
2053 …_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __move_assign(basic_string& __str, false_…
2056 __move_assign(basic_string& __str, true_type)
2064 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __move_assign_alloc(basic_string& __str)
2068 … __str, integral_constant<bool, __alloc_traits::propagate_on_container_move_assignment::value>());
2527 basic_string<_CharT, _Traits, _Allocator>::operator=(const basic_string& __str) {
2528 if (this != std::addressof(__str)) {
2529 __copy_assign_alloc(__str);
2531 if (!__str.__is_long()) {
2533 if (__get_short_size() < __str.__get_short_size())
2534 __annotate_increase(__str.__get_short_size() - __get_short_size());
2535 __r_.first() = __str.__r_.first();
2539 return __assign_no_alias<true>(__str.data(), __str.size());
2542 return __assign_no_alias<false>(__str.data(), __str.size());
2552 basic_string<_CharT, _Traits, _Allocator>::__move_assign(basic_string& __str, false_type)
2554 if (__alloc() != __str.__alloc())
2555 assign(__str);
2557 __move_assign(__str, true_type());
2562 basic_string<_CharT, _Traits, _Allocator>::__move_assign(basic_string& __str, true_type)
2580 size_type __str_old_size = __str.size();
2581 bool __str_was_short = !__str.__is_long();
2583 __move_assign_alloc(__str);
2584 __r_.first() = __str.__r_.first();
2585 __str.__set_short_size(0);
2586 traits_type::assign(__str.__get_short_pointer()[0], value_type());
2588 if (__str_was_short && this != &__str)
2589 __str.__annotate_shrink(__str_old_size);
2593 __str.__annotate_new(0);
2602 if (!__is_long() && &__str != this)
2603 // If it is long string, delete was never called on original __str's buffer.
2671 basic_string<_CharT, _Traits, _Allocator>::assign(const basic_string& __str, size_type __pos, size_…
2672 size_type __sz = __str.size();
2675 return assign(__str.data() + __pos, std::min(__n, __sz - __pos));
2820 basic_string<_CharT, _Traits, _Allocator>::append(const basic_string& __str, size_type __pos, size_…
2821 size_type __sz = __str.size();
2824 return append(__str.data() + __pos, std::min(__n, __sz - __pos));
2942 size_type __pos1, const basic_string& __str, size_type __pos2, size_type __n) {
2943 size_type __str_sz = __str.size();
2946 return insert(__pos1, __str.data() + __pos2, std::min(__n, __str_sz - __pos2));
3078 size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2) {
3079 size_type __str_sz = __str.size();
3082 return replace(__pos1, __n1, __str.data() + __pos2, std::min(__n2, __str_sz - __pos2));
3305 …CPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocator>::swap(basic_string& __str)
3314 __alloc() == __str.__alloc(),
3318 if (this != &__str && !__str.__is_long())
3319 __str.__annotate_delete();
3320 std::swap(__r_.first(), __str.__r_.first());
3321 std::__swap_allocator(__alloc(), __str.__alloc());
3324 if (this != &__str && !__str.__is_long())
3325 __str.__annotate_new(__str.__get_short_size());
3347 basic_string<_CharT, _Traits, _Allocator>::find(const basic_string& __str, size_type __pos) const _…
3348 …_find<value_type, size_type, traits_type, npos>(data(), size(), __str.data(), __pos, __str.size());
3385 basic_string<_CharT, _Traits, _Allocator>::rfind(const basic_string& __str, size_type __pos) const …
3386 …rfind<value_type, size_type, traits_type, npos>(data(), size(), __str.data(), __pos, __str.size());
3423 basic_string<_CharT, _Traits, _Allocator>::find_first_of(const basic_string& __str, size_type __pos…
3425 data(), size(), __str.data(), __pos, __str.size());
3463 basic_string<_CharT, _Traits, _Allocator>::find_last_of(const basic_string& __str, size_type __pos)…
3465 data(), size(), __str.data(), __pos, __str.size());
3504 const basic_string& __str, size_type __pos) const _NOEXCEPT {
3506 data(), size(), __str.data(), __pos, __str.size());
3545 const basic_string& __str, size_type __pos) const _NOEXCEPT {
3547 data(), size(), __str.data(), __pos, __str.size());
3593 basic_string<_CharT, _Traits, _Allocator>::compare(const basic_string& __str) const _NOEXCEPT {
3594 return compare(__self_view(__str));
3625 … _Traits, _Allocator>::compare(size_type __pos1, size_type __n1, const basic_string& __str) const {
3626 return compare(__pos1, __n1, __str.data(), __str.size());
3642 …size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2) con…
3643 return compare(__pos1, __n1, __self_view(__str), __pos2, __n2);
3999 _LIBCPP_EXPORTED_FROM_ABI int stoi(const string& __str, size_t* __idx = nullptr, int __base = 10);
4000 _LIBCPP_EXPORTED_FROM_ABI long stol(const string& __str, size_t* __idx = nullptr, int __base = 10);
4001 _LIBCPP_EXPORTED_FROM_ABI unsigned long stoul(const string& __str, size_t* __idx = nullptr, int __b…
4002 _LIBCPP_EXPORTED_FROM_ABI long long stoll(const string& __str, size_t* __idx = nullptr, int __base …
4003 _LIBCPP_EXPORTED_FROM_ABI unsigned long long stoull(const string& __str, size_t* __idx = nullptr, i…
4005 _LIBCPP_EXPORTED_FROM_ABI float stof(const string& __str, size_t* __idx = nullptr);
4006 _LIBCPP_EXPORTED_FROM_ABI double stod(const string& __str, size_t* __idx = nullptr);
4007 _LIBCPP_EXPORTED_FROM_ABI long double stold(const string& __str, size_t* __idx = nullptr);
4020 _LIBCPP_EXPORTED_FROM_ABI int stoi(const wstring& __str, size_t* __idx = nullptr, int __base = 10);
4021 _LIBCPP_EXPORTED_FROM_ABI long stol(const wstring& __str, size_t* __idx = nullptr, int __base = 10);
4022 _LIBCPP_EXPORTED_FROM_ABI unsigned long stoul(const wstring& __str, size_t* __idx = nullptr, int __…
4023 _LIBCPP_EXPORTED_FROM_ABI long long stoll(const wstring& __str, size_t* __idx = nullptr, int __base…
4024 _LIBCPP_EXPORTED_FROM_ABI unsigned long long stoull(const wstring& __str, size_t* __idx = nullptr, …
4026 _LIBCPP_EXPORTED_FROM_ABI float stof(const wstring& __str, size_t* __idx = nullptr);
4027 _LIBCPP_EXPORTED_FROM_ABI double stod(const wstring& __str, size_t* __idx = nullptr);
4028 _LIBCPP_EXPORTED_FROM_ABI long double stold(const wstring& __str, size_t* __idx = nullptr);
4074 …or<<(basic_ostream<_CharT, _Traits>& __os, const basic_string<_CharT, _Traits, _Allocator>& __str);
4078 operator>>(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Allocator>& __str);
4082 getline(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Allocator>& __str, _Ch…
4086 getline(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Allocator>& __str);
4090 getline(basic_istream<_CharT, _Traits>&& __is, basic_string<_CharT, _Traits, _Allocator>& __str, _C…
4094 getline(basic_istream<_CharT, _Traits>&& __is, basic_string<_CharT, _Traits, _Allocator>& __str);
4099 erase(basic_string<_CharT, _Traits, _Allocator>& __str, const _Up& __v) {
4100 auto __old_size = __str.size();
4101 __str.erase(std::remove(__str.begin(), __str.end(), __v), __str.end());
4102 return __old_size - __str.size();
4107 erase_if(basic_string<_CharT, _Traits, _Allocator>& __str, _Predicate __pred) {
4108 auto __old_size = __str.size();
4109 __str.erase(std::remove_if(__str.begin(), __str.end(), __pred), __str.end());
4110 return __old_size - __str.size();
4119 operator""s(const char* __str, size_t __len) {
4120 return basic_string<char>(__str, __len);
4125 operator""s(const wchar_t* __str, size_t __len) {
4126 return basic_string<wchar_t>(__str, __len);
4131 inline _LIBCPP_HIDE_FROM_ABI constexpr basic_string<char8_t> operator""s(const char8_t* __str, size…
4132 return basic_string<char8_t>(__str, __len);
4137 operator""s(const char16_t* __str, size_t __len) {
4138 return basic_string<char16_t>(__str, __len);
4142 operator""s(const char32_t* __str, size_t __len) {
4143 return basic_string<char32_t>(__str, __len);