• Home
  • Raw
  • Download

Lines Matching refs:__n

830     basic_string(const _CharT* __s, size_type __n);
832 basic_string(const _CharT* __s, size_type __n, const _Allocator& __a);
834 basic_string(size_type __n, _CharT __c);
838 basic_string(size_type __n, _CharT __c, const _Allocator& __a);
840 basic_string(const basic_string& __str, size_type __pos, size_type __n,
848 basic_string(const _Tp& __t, size_type __pos, size_type __n,
955 void resize(size_type __n, value_type __c);
956 _LIBCPP_INLINE_VISIBILITY void resize(size_type __n) {resize(__n, value_type());}
959 _LIBCPP_INLINE_VISIBILITY void __resize_default_init(size_type __n);
973 const_reference at(size_type __n) const;
974 reference at(size_type __n);
1004 basic_string& append(const basic_string& __str, size_type __pos, size_type __n=npos);
1014 append(const _Tp& __t, size_type __pos, size_type __n=npos);
1015 basic_string& append(const value_type* __s, size_type __n);
1017 basic_string& append(size_type __n, value_type __c);
1020 void __append_default_init(size_type __n);
1081 basic_string& assign(const basic_string& __str, size_type __pos, size_type __n=npos);
1090 assign(const _Tp & __t, size_type __pos, size_type __n=npos);
1091 basic_string& assign(const value_type* __s, size_type __n);
1093 basic_string& assign(size_type __n, value_type __c);
1137 insert(size_type __pos1, const _Tp& __t, size_type __pos2, size_type __n=npos);
1138 …_string& insert(size_type __pos1, const basic_string& __str, size_type __pos2, size_type __n=npos);
1139 basic_string& insert(size_type __pos, const value_type* __s, size_type __n);
1141 basic_string& insert(size_type __pos, size_type __n, value_type __c);
1144 iterator insert(const_iterator __pos, size_type __n, value_type __c);
1169 basic_string& erase(size_type __pos = 0, size_type __n = npos);
1211 …ic_string& replace(const_iterator __i1, const_iterator __i2, const value_type* __s, size_type __n);
1215 basic_string& replace(const_iterator __i1, const_iterator __i2, size_type __n, value_type __c);
1230 size_type copy(value_type* __s, size_type __n, size_type __pos = 0) const;
1232 basic_string substr(size_type __pos = 0, size_type __n = npos) const;
1266 size_type find(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
1282 size_type rfind(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
1298 size_type find_first_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
1315 size_type find_last_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
1332 …size_type find_first_not_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
1349 … size_type find_last_not_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
1432 bool __addable(const const_iterator* __i, ptrdiff_t __n) const;
1433 bool __subscriptable(const const_iterator* __i, ptrdiff_t __n) const;
1550 void __init(size_type __n, value_type __c);
1588 basic_string& __assign_no_alias(const value_type* __s, size_type __n);
1595 void __erase_external_with_move(size_type __pos, size_type __n);
1666 basic_string& __assign_external(const value_type* __s, size_type __n);
1668 // Assigns the value in __s, guaranteed to be __n < __min_cap in length.
1669 inline basic_string& __assign_short(const value_type* __s, size_type __n) {
1671 ? (__set_long_size(__n), __get_long_pointer())
1672 : (__set_short_size(__n), __get_short_pointer());
1673 traits_type::move(_VSTD::__to_address(__p), __s, __n);
1674 traits_type::assign(__p[__n], value_type());
1858 basic_string<_CharT, _Traits, _Allocator>::basic_string(const _CharT* __s, size_type __n)
1861 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "basic_string(const char*, n) detected nullptr");
1862 __init(__s, __n);
1870 basic_string<_CharT, _Traits, _Allocator>::basic_string(const _CharT* __s, size_type __n, const _Al…
1873 …_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "basic_string(const char*, n, allocator) detected nullp…
1874 __init(__s, __n);
1972 basic_string<_CharT, _Traits, _Allocator>::__init(size_type __n, value_type __c)
1974 if (__n > max_size())
1977 if (__n < __min_cap)
1979 __set_short_size(__n);
1984 size_type __cap = __recommend(__n);
1988 __set_long_size(__n);
1990 traits_type::assign(_VSTD::__to_address(__p), __n, __c);
1991 traits_type::assign(__p[__n], value_type());
1996 basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, _CharT __c)
1999 __init(__n, __c);
2007 basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, _CharT __c, const _Allocator…
2010 __init(__n, __c);
2018 size_type __pos, size_type __n,
2025 __init(__str.data() + __pos, _VSTD::min(__n, __str_sz - __pos));
2049 const _Tp& __t, size_type __pos, size_type __n, const allocator_type& __a)
2053 __self_view __sv = __sv0.substr(__pos, __n);
2271 const value_type* __s, size_type __n) {
2273 if (__n < __cap) {
2275 __is_short ? __set_short_size(__n) : __set_long_size(__n);
2276 traits_type::copy(_VSTD::__to_address(__p), __s, __n);
2277 traits_type::assign(__p[__n], value_type());
2278 __invalidate_iterators_past(__n);
2281 __grow_by_and_replace(__cap - 1, __n - __cap + 1, __sz, 0, __sz, __n, __s);
2289 const value_type* __s, size_type __n) {
2291 if (__cap >= __n) {
2293 traits_type::move(__p, __s, __n);
2294 traits_type::assign(__p[__n], value_type());
2295 __set_size(__n);
2296 __invalidate_iterators_past(__n);
2299 __grow_by_and_replace(__cap, __n - __cap, __sz, 0, __sz, __n, __s);
2306 basic_string<_CharT, _Traits, _Allocator>::assign(const value_type* __s, size_type __n)
2308 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::assign received nullptr");
2309 return (_LIBCPP_BUILTIN_CONSTANT_P(__n) && __n < __min_cap)
2310 ? __assign_short(__s, __n)
2311 : __assign_external(__s, __n);
2316 basic_string<_CharT, _Traits, _Allocator>::assign(size_type __n, value_type __c)
2319 if (__cap < __n)
2322 __grow_by(__cap, __n - __cap, __sz, 0, __sz);
2325 __invalidate_iterators_past(__n);
2327 traits_type::assign(__p, __n, __c);
2328 traits_type::assign(__p[__n], value_type());
2329 __set_size(__n);
2451 size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
2453 if (__cap < __n)
2456 __grow_by(__cap, __n - __cap, __sz, 0, __sz);
2459 __invalidate_iterators_past(__n);
2464 __set_size(__n);
2470 …ing<_CharT, _Traits, _Allocator>::assign(const basic_string& __str, size_type __pos, size_type __n)
2475 return assign(__str.data() + __pos, _VSTD::min(__n, __sz - __pos));
2486 basic_string<_CharT, _Traits, _Allocator>::assign(const _Tp & __t, size_type __pos, size_type __n)
2492 return assign(__sv.data() + __pos, _VSTD::min(__n, __sz - __pos));
2517 basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s, size_type __n)
2519 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::append received nullptr");
2522 if (__cap - __sz >= __n)
2524 if (__n)
2527 traits_type::copy(__p + __sz, __s, __n);
2528 __sz += __n;
2534 __grow_by_and_replace(__cap, __sz + __n - __cap, __sz, __sz, 0, __n, __s);
2540 basic_string<_CharT, _Traits, _Allocator>::append(size_type __n, value_type __c)
2542 if (__n)
2546 if (__cap - __sz < __n)
2547 __grow_by(__cap, __sz + __n - __cap, __sz, __sz, 0);
2549 traits_type::assign(_VSTD::__to_address(__p) + __sz, __n, __c);
2550 __sz += __n;
2559 basic_string<_CharT, _Traits, _Allocator>::__append_default_init(size_type __n)
2561 if (__n)
2565 if (__cap - __sz < __n)
2566 __grow_by(__cap, __sz + __n - __cap, __sz, __sz, 0);
2568 __sz += __n;
2633 size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
2634 if (__n)
2645 if (__cap - __sz < __n)
2646 __grow_by(__cap, __sz + __n - __cap, __sz, __sz, 0);
2651 __set_size(__sz + __n);
2667 …ing<_CharT, _Traits, _Allocator>::append(const basic_string& __str, size_type __pos, size_type __n)
2672 return append(__str.data() + __pos, _VSTD::min(__n, __sz - __pos));
2682 basic_string<_CharT, _Traits, _Allocator>::append(const _Tp & __t, size_type __pos, size_type __n)
2688 return append(__sv.data() + __pos, _VSTD::min(__n, __sz - __pos));
2703 …_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, const value_type* __s, size_type __n)
2705 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::insert received nullptr");
2710 if (__cap - __sz >= __n)
2712 if (__n)
2719 __s += __n;
2720 traits_type::move(__p + __pos + __n, __p + __pos, __n_move);
2722 traits_type::move(__p + __pos, __s, __n);
2723 __sz += __n;
2729 __grow_by_and_replace(__cap, __sz + __n - __cap, __sz, __pos, 0, __n, __s);
2735 basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, size_type __n, value_type __c)
2740 if (__n)
2744 if (__cap - __sz >= __n)
2749 traits_type::move(__p + __pos + __n, __p + __pos, __n_move);
2753 __grow_by(__cap, __sz + __n - __cap, __sz, __pos, 0, __n);
2756 traits_type::assign(__p + __pos, __n, __c);
2757 __sz += __n;
2799 size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
2800 if (__n)
2813 if (__cap - __sz >= __n)
2818 traits_type::move(__p + __ip + __n, __p + __ip, __n_move);
2822 __grow_by(__cap, __sz + __n - __cap, __sz, __ip, 0, __n);
2825 __sz += __n;
2845 size_type __pos2, size_type __n)
2850 return insert(__pos1, __str.data() + __pos2, _VSTD::min(__n, __str_sz - __pos2));
2861 size_type __pos2, size_type __n)
2867 return insert(__pos1, __sv.data() + __pos2, _VSTD::min(__n, __str_sz - __pos2));
2907 basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, size_type __n, value_type _…
2915 insert(static_cast<size_type>(__p), __n, __c);
3080 …Allocator>::replace(const_iterator __i1, const_iterator __i2, const value_type* __s, size_type __n)
3082 …urn replace(static_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1), __s, __n);
3096 …aits, _Allocator>::replace(const_iterator __i1, const_iterator __i2, size_type __n, value_type __c)
3098 …return replace(static_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1), __n, _…
3103 // 'externally instantiated' erase() implementation, called when __n != npos.
3108 size_type __pos, size_type __n)
3110 if (__n)
3114 __n = _VSTD::min(__n, __sz - __pos);
3115 size_type __n_move = __sz - __pos - __n;
3117 traits_type::move(__p + __pos, __p + __pos + __n, __n_move);
3118 __sz -= __n;
3128 size_type __n) {
3130 if (__n == npos) {
3133 __erase_external_with_move(__pos, __n);
3233 basic_string<_CharT, _Traits, _Allocator>::resize(size_type __n, value_type __c)
3236 if (__n > __sz)
3237 append(__n - __sz, __c);
3239 __erase_to_end(__n);
3244 basic_string<_CharT, _Traits, _Allocator>::__resize_default_init(size_type __n)
3247 if (__n > __sz) {
3248 __append_default_init(__n - __sz);
3250 __erase_to_end(__n);
3372 basic_string<_CharT, _Traits, _Allocator>::at(size_type __n) const
3374 if (__n >= size())
3376 return (*this)[__n];
3381 basic_string<_CharT, _Traits, _Allocator>::at(size_type __n)
3383 if (__n >= size())
3385 return (*this)[__n];
3426 basic_string<_CharT, _Traits, _Allocator>::copy(value_type* __s, size_type __n, size_type __pos) co…
3431 size_type __rlen = _VSTD::min(__n, __sz - __pos);
3439 basic_string<_CharT, _Traits, _Allocator>::substr(size_type __pos, size_type __n) const
3441 return basic_string(*this, __pos, __n, __alloc());
3485 size_type __n) const _NOEXCEPT
3487 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find(): received nullptr");
3489 (data(), size(), __s, __pos, __n);
3543 size_type __n) const _NOEXCEPT
3545 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::rfind(): received nullptr");
3547 (data(), size(), __s, __pos, __n);
3601 size_type __n) const _NOEXCEPT
3603 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_first_of(): received nullptr");
3605 (data(), size(), __s, __pos, __n);
3659 size_type __n) const _NOEXCEPT
3661 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_last_of(): received nullptr");
3663 (data(), size(), __s, __pos, __n);
3717 size_type __n) const _NOEXCEPT
3719 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_first_not_of(): received nullptr");
3721 (data(), size(), __s, __pos, __n);
3776 size_type __n) const _NOEXCEPT
3778 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_last_not_of(): received nullptr");
3780 (data(), size(), __s, __pos, __n);
4475 basic_string<_CharT, _Traits, _Allocator>::__addable(const const_iterator* __i, ptrdiff_t __n) const
4477 const value_type* __p = _VSTD::__to_address(__i->base()) + __n;
4483 basic_string<_CharT, _Traits, _Allocator>::__subscriptable(const const_iterator* __i, ptrdiff_t __n
4485 const value_type* __p = _VSTD::__to_address(__i->base()) + __n;