Lines Matching refs:__n
782 basic_string(const _CharT* __s, size_type __n);
784 basic_string(const _CharT* __s, size_type __n, const _Allocator& __a);
786 basic_string(size_type __n, _CharT __c);
788 basic_string(size_type __n, _CharT __c, const _Allocator& __a);
789 basic_string(const basic_string& __str, size_type __pos, size_type __n,
796 basic_string(const _Tp& __t, size_type __pos, size_type __n,
901 void resize(size_type __n, value_type __c);
902 _LIBCPP_INLINE_VISIBILITY void resize(size_type __n) {resize(__n, value_type());}
914 const_reference at(size_type __n) const;
915 reference at(size_type __n);
929 basic_string& append(const basic_string& __str, size_type __pos, size_type __n=npos);
937 append(const _Tp& __t, size_type __pos, size_type __n=npos);
938 basic_string& append(const value_type* __s, size_type __n);
940 basic_string& append(size_type __n, value_type __c);
994 basic_string& assign(const basic_string& __str, size_type __pos, size_type __n=npos);
1003 basic_string& assign(const value_type* __s, size_type __n);
1005 basic_string& assign(size_type __n, value_type __c);
1040 insert(size_type __pos1, const _Tp& __t, size_type __pos2, size_type __n=npos);
1041 …_string& insert(size_type __pos1, const basic_string& __str, size_type __pos2, size_type __n=npos);
1042 basic_string& insert(size_type __pos, const value_type* __s, size_type __n);
1044 basic_string& insert(size_type __pos, size_type __n, value_type __c);
1047 iterator insert(const_iterator __pos, size_type __n, value_type __c);
1072 basic_string& erase(size_type __pos = 0, size_type __n = npos);
1099 …ic_string& replace(const_iterator __i1, const_iterator __i2, const value_type* __s, size_type __n);
1103 basic_string& replace(const_iterator __i1, const_iterator __i2, size_type __n, value_type __c);
1118 size_type copy(value_type* __s, size_type __n, size_type __pos = 0) const;
1120 basic_string substr(size_type __pos = 0, size_type __n = npos) const;
1147 size_type find(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
1156 size_type rfind(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
1165 size_type find_first_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
1175 size_type find_last_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
1185 …size_type find_first_not_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
1195 … size_type find_last_not_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
1232 bool __addable(const const_iterator* __i, ptrdiff_t __n) const;
1233 bool __subscriptable(const const_iterator* __i, ptrdiff_t __n) const;
1346 void __init(size_type __n, value_type __c);
1596 basic_string<_CharT, _Traits, _Allocator>::basic_string(const _CharT* __s, size_type __n)
1598 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "basic_string(const char*, n) detected nullptr");
1599 __init(__s, __n);
1607 basic_string<_CharT, _Traits, _Allocator>::basic_string(const _CharT* __s, size_type __n, const _Al…
1610 …_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "basic_string(const char*, n, allocator) detected nullp…
1611 __init(__s, __n);
1687 basic_string<_CharT, _Traits, _Allocator>::__init(size_type __n, value_type __c)
1689 if (__n > max_size())
1692 if (__n < __min_cap)
1694 __set_short_size(__n);
1699 size_type __cap = __recommend(__n);
1703 __set_long_size(__n);
1705 traits_type::assign(_VSTD::__to_raw_pointer(__p), __n, __c);
1706 traits_type::assign(__p[__n], value_type());
1711 basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, _CharT __c)
1713 __init(__n, __c);
1721 basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, _CharT __c, const _Allocator…
1724 __init(__n, __c);
1732 size_type __pos, size_type __n,
1739 __init(__str.data() + __pos, _VSTD::min(__n, __str_sz - __pos));
1763 const _Tp& __t, size_type __pos, size_type __n, const allocator_type& __a,
1767 __self_view __sv = __self_view(__t).substr(__pos, __n);
1980 basic_string<_CharT, _Traits, _Allocator>::assign(const value_type* __s, size_type __n)
1982 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::assign received nullptr");
1984 if (__cap >= __n)
1987 traits_type::move(__p, __s, __n);
1988 traits_type::assign(__p[__n], value_type());
1989 __set_size(__n);
1990 __invalidate_iterators_past(__n);
1995 __grow_by_and_replace(__cap, __n - __cap, __sz, 0, __sz, __n, __s);
2002 basic_string<_CharT, _Traits, _Allocator>::assign(size_type __n, value_type __c)
2005 if (__cap < __n)
2008 __grow_by(__cap, __n - __cap, __sz, 0, __sz);
2011 __invalidate_iterators_past(__n);
2013 traits_type::assign(__p, __n, __c);
2014 traits_type::assign(__p[__n], value_type());
2015 __set_size(__n);
2121 size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
2123 if (__cap < __n)
2126 __grow_by(__cap, __n - __cap, __sz, 0, __sz);
2129 __invalidate_iterators_past(__n);
2134 __set_size(__n);
2140 …ing<_CharT, _Traits, _Allocator>::assign(const basic_string& __str, size_type __pos, size_type __n)
2145 return assign(__str.data() + __pos, _VSTD::min(__n, __sz - __pos));
2155 basic_string<_CharT, _Traits, _Allocator>::assign(const _Tp & __t, size_type __pos, size_type __n)
2161 return assign(__sv.data() + __pos, _VSTD::min(__n, __sz - __pos));
2177 basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s, size_type __n)
2179 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::append received nullptr");
2182 if (__cap - __sz >= __n)
2184 if (__n)
2187 traits_type::copy(__p + __sz, __s, __n);
2188 __sz += __n;
2194 __grow_by_and_replace(__cap, __sz + __n - __cap, __sz, __sz, 0, __n, __s);
2200 basic_string<_CharT, _Traits, _Allocator>::append(size_type __n, value_type __c)
2202 if (__n)
2206 if (__cap - __sz < __n)
2207 __grow_by(__cap, __sz + __n - __cap, __sz, __sz, 0);
2209 traits_type::assign(_VSTD::__to_raw_pointer(__p) + __sz, __n, __c);
2210 __sz += __n;
2276 size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
2277 if (__n)
2286 if (__cap - __sz < __n)
2287 __grow_by(__cap, __sz + __n - __cap, __sz, __sz, 0);
2292 __set_size(__sz + __n);
2308 …ing<_CharT, _Traits, _Allocator>::append(const basic_string& __str, size_type __pos, size_type __n)
2313 return append(__str.data() + __pos, _VSTD::min(__n, __sz - __pos));
2323 basic_string<_CharT, _Traits, _Allocator>::append(const _Tp & __t, size_type __pos, size_type __n)
2329 return append(__sv.data() + __pos, _VSTD::min(__n, __sz - __pos));
2344 …_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, const value_type* __s, size_type __n)
2346 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::insert received nullptr");
2351 if (__cap - __sz >= __n)
2353 if (__n)
2360 __s += __n;
2361 traits_type::move(__p + __pos + __n, __p + __pos, __n_move);
2363 traits_type::move(__p + __pos, __s, __n);
2364 __sz += __n;
2370 __grow_by_and_replace(__cap, __sz + __n - __cap, __sz, __pos, 0, __n, __s);
2376 basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, size_type __n, value_type __c)
2381 if (__n)
2385 if (__cap - __sz >= __n)
2390 traits_type::move(__p + __pos + __n, __p + __pos, __n_move);
2394 __grow_by(__cap, __sz + __n - __cap, __sz, __pos, 0, __n);
2397 traits_type::assign(__p + __pos, __n, __c);
2398 __sz += __n;
2440 size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
2441 if (__n)
2452 if (__cap - __sz >= __n)
2457 traits_type::move(__p + __ip + __n, __p + __ip, __n_move);
2461 __grow_by(__cap, __sz + __n - __cap, __sz, __ip, 0, __n);
2464 __sz += __n;
2484 size_type __pos2, size_type __n)
2489 return insert(__pos1, __str.data() + __pos2, _VSTD::min(__n, __str_sz - __pos2));
2500 size_type __pos2, size_type __n)
2506 return insert(__pos1, __sv.data() + __pos2, _VSTD::min(__n, __str_sz - __pos2));
2546 basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, size_type __n, value_type _…
2554 insert(static_cast<size_type>(__p), __n, __c);
2719 …Allocator>::replace(const_iterator __i1, const_iterator __i2, const value_type* __s, size_type __n)
2721 …urn replace(static_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1), __s, __n);
2735 …aits, _Allocator>::replace(const_iterator __i1, const_iterator __i2, size_type __n, value_type __c)
2737 …return replace(static_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1), __n, _…
2744 basic_string<_CharT, _Traits, _Allocator>::erase(size_type __pos, size_type __n)
2749 if (__n)
2752 __n = _VSTD::min(__n, __sz - __pos);
2753 size_type __n_move = __sz - __pos - __n;
2755 traits_type::move(__p + __pos, __p + __pos + __n, __n_move);
2756 __sz -= __n;
2859 basic_string<_CharT, _Traits, _Allocator>::resize(size_type __n, value_type __c)
2862 if (__n > __sz)
2863 append(__n - __sz, __c);
2865 __erase_to_end(__n);
2964 basic_string<_CharT, _Traits, _Allocator>::at(size_type __n) const
2966 if (__n >= size())
2968 return (*this)[__n];
2973 basic_string<_CharT, _Traits, _Allocator>::at(size_type __n)
2975 if (__n >= size())
2977 return (*this)[__n];
3018 basic_string<_CharT, _Traits, _Allocator>::copy(value_type* __s, size_type __n, size_type __pos) co…
3023 size_type __rlen = _VSTD::min(__n, __sz - __pos);
3031 basic_string<_CharT, _Traits, _Allocator>::substr(size_type __pos, size_type __n) const
3033 return basic_string(*this, __pos, __n, __alloc());
3077 size_type __n) const _NOEXCEPT
3079 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find(): received nullptr");
3081 (data(), size(), __s, __pos, __n);
3130 size_type __n) const _NOEXCEPT
3132 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::rfind(): received nullptr");
3134 (data(), size(), __s, __pos, __n);
3183 size_type __n) const _NOEXCEPT
3185 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_first_of(): received nullptr");
3187 (data(), size(), __s, __pos, __n);
3236 size_type __n) const _NOEXCEPT
3238 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_last_of(): received nullptr");
3240 (data(), size(), __s, __pos, __n);
3289 size_type __n) const _NOEXCEPT
3291 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_first_not_of(): received nullptr");
3293 (data(), size(), __s, __pos, __n);
3343 size_type __n) const _NOEXCEPT
3345 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_last_not_of(): received nullptr");
3347 (data(), size(), __s, __pos, __n);
3987 basic_string<_CharT, _Traits, _Allocator>::__addable(const const_iterator* __i, ptrdiff_t __n) const
3989 const value_type* __p = _VSTD::__to_raw_pointer(__i->base()) + __n;
3995 basic_string<_CharT, _Traits, _Allocator>::__subscriptable(const const_iterator* __i, ptrdiff_t __n…
3997 const value_type* __p = _VSTD::__to_raw_pointer(__i->base()) + __n;