• Home
  • Raw
  • Download

Lines Matching refs:__n

519     static int              compare(const char_type* __s1, const char_type* __s2, size_t __n);
521 static const char_type* find(const char_type* __s, size_t __n, const char_type& __a);
522 static char_type* move(char_type* __s1, const char_type* __s2, size_t __n);
523 static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n);
524 static char_type* assign(char_type* __s, size_t __n, char_type __a);
540 char_traits<_CharT>::compare(const char_type* __s1, const char_type* __s2, size_t __n)
542 for (; __n; --__n, ++__s1, ++__s2)
566 char_traits<_CharT>::find(const char_type* __s, size_t __n, const char_type& __a)
568 for (; __n; --__n)
579 char_traits<_CharT>::move(char_type* __s1, const char_type* __s2, size_t __n)
584 for (; __n; --__n, ++__s1, ++__s2)
589 __s1 += __n;
590 __s2 += __n;
591 for (; __n; --__n)
600 char_traits<_CharT>::copy(char_type* __s1, const char_type* __s2, size_t __n)
602 _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
604 for (; __n; --__n, ++__s1, ++__s2)
612 char_traits<_CharT>::assign(char_type* __s, size_t __n, char_type __a)
615 for (; __n; --__n, ++__s)
638 static inline int compare(const char_type* __s1, const char_type* __s2, size_t __n)
639 {return __n == 0 ? 0 : memcmp(__s1, __s2, __n);}
641 static inline const char_type* find(const char_type* __s, size_t __n, const char_type& __a)
642 {return __n == 0 ? NULL : (const char_type*) memchr(__s, to_int_type(__a), __n);}
643 static inline char_type* move(char_type* __s1, const char_type* __s2, size_t __n)
644 {return __n == 0 ? __s1 : (char_type*) memmove(__s1, __s2, __n);}
645 static inline char_type* copy(char_type* __s1, const char_type* __s2, size_t __n)
647 _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
648 return __n == 0 ? __s1 : (char_type*)memcpy(__s1, __s2, __n);
650 static inline char_type* assign(char_type* __s, size_t __n, char_type __a)
651 {return __n == 0 ? __s : (char_type*)memset(__s, to_int_type(__a), __n);}
683 static inline int compare(const char_type* __s1, const char_type* __s2, size_t __n)
684 {return __n == 0 ? 0 : wmemcmp(__s1, __s2, __n);}
687 static inline const char_type* find(const char_type* __s, size_t __n, const char_type& __a)
688 {return __n == 0 ? NULL : (const char_type*)wmemchr(__s, __a, __n);}
689 static inline char_type* move(char_type* __s1, const char_type* __s2, size_t __n)
690 {return __n == 0 ? __s1 : (char_type*)wmemmove(__s1, __s2, __n);}
691 static inline char_type* copy(char_type* __s1, const char_type* __s2, size_t __n)
693 _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
694 return __n == 0 ? __s1 : (char_type*)wmemcpy(__s1, __s2, __n);
696 static inline char_type* assign(char_type* __s, size_t __n, char_type __a)
697 {return __n == 0 ? __s : (char_type*)wmemset(__s, __a, __n);}
729 static int compare(const char_type* __s1, const char_type* __s2, size_t __n);
731 static const char_type* find(const char_type* __s, size_t __n, const char_type& __a);
732 static char_type* move(char_type* __s1, const char_type* __s2, size_t __n);
733 static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n);
734 static char_type* assign(char_type* __s, size_t __n, char_type __a);
750 char_traits<char16_t>::compare(const char_type* __s1, const char_type* __s2, size_t __n)
752 for (; __n; --__n, ++__s1, ++__s2)
774 char_traits<char16_t>::find(const char_type* __s, size_t __n, const char_type& __a)
776 for (; __n; --__n)
787 char_traits<char16_t>::move(char_type* __s1, const char_type* __s2, size_t __n)
792 for (; __n; --__n, ++__s1, ++__s2)
797 __s1 += __n;
798 __s2 += __n;
799 for (; __n; --__n)
807 char_traits<char16_t>::copy(char_type* __s1, const char_type* __s2, size_t __n)
809 _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
811 for (; __n; --__n, ++__s1, ++__s2)
818 char_traits<char16_t>::assign(char_type* __s, size_t __n, char_type __a)
821 for (; __n; --__n, ++__s)
842 static int compare(const char_type* __s1, const char_type* __s2, size_t __n);
844 static const char_type* find(const char_type* __s, size_t __n, const char_type& __a);
845 static char_type* move(char_type* __s1, const char_type* __s2, size_t __n);
846 static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n);
847 static char_type* assign(char_type* __s, size_t __n, char_type __a);
863 char_traits<char32_t>::compare(const char_type* __s1, const char_type* __s2, size_t __n)
865 for (; __n; --__n, ++__s1, ++__s2)
887 char_traits<char32_t>::find(const char_type* __s, size_t __n, const char_type& __a)
889 for (; __n; --__n)
900 char_traits<char32_t>::move(char_type* __s1, const char_type* __s2, size_t __n)
905 for (; __n; --__n, ++__s1, ++__s2)
910 __s1 += __n;
911 __s2 += __n;
912 for (; __n; --__n)
920 char_traits<char32_t>::copy(char_type* __s1, const char_type* __s2, size_t __n)
922 _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
924 for (; __n; --__n, ++__s1, ++__s2)
931 char_traits<char32_t>::assign(char_type* __s, size_t __n, char_type __a)
934 for (; __n; --__n, ++__s)
960 const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
962 if (__pos > __sz || __sz - __pos < __n)
964 if (__n == 0)
968 __s, __s + __n, _Traits::eq,
1000 const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
1003 if (__n < __sz - __pos)
1004 __pos += __n;
1008 __p, __p + __pos, __s, __s + __n, _Traits::eq,
1010 if (__n > 0 && __r == __p + __pos)
1019 const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
1021 if (__pos >= __sz || __n == 0)
1024 (__p + __pos, __p + __sz, __s, __s + __n, _Traits::eq );
1035 const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
1037 if (__n != 0)
1045 const _CharT* __r = _Traits::find(__s, __n, *--__ps);
1058 const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
1064 if (_Traits::find(__s, __n, *__ps) == 0)
1091 const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
1098 if (_Traits::find(__s, __n, *--__ps) == 0)
1339 basic_string(const value_type* __s, size_type __n);
1341 basic_string(const value_type* __s, size_type __n, const allocator_type& __a);
1343 basic_string(size_type __n, value_type __c);
1345 basic_string(size_type __n, value_type __c, const allocator_type& __a);
1346 basic_string(const basic_string& __str, size_type __pos, size_type __n = npos,
1437 void resize(size_type __n, value_type __c);
1438 _LIBCPP_INLINE_VISIBILITY void resize(size_type __n) {resize(__n, value_type());}
1450 const_reference at(size_type __n) const;
1451 reference at(size_type __n);
1462 basic_string& append(const basic_string& __str, size_type __pos, size_type __n=npos);
1463 basic_string& append(const value_type* __s, size_type __n);
1465 basic_string& append(size_type __n, value_type __c);
1501 basic_string& assign(const basic_string& __str, size_type __pos, size_type __n=npos);
1502 basic_string& assign(const value_type* __s, size_type __n);
1504 basic_string& assign(size_type __n, value_type __c);
1527 …_string& insert(size_type __pos1, const basic_string& __str, size_type __pos2, size_type __n=npos);
1528 basic_string& insert(size_type __pos, const value_type* __s, size_type __n);
1530 basic_string& insert(size_type __pos, size_type __n, value_type __c);
1533 iterator insert(const_iterator __pos, size_type __n, value_type __c);
1555 basic_string& erase(size_type __pos = 0, size_type __n = npos);
1570 …ic_string& replace(const_iterator __i1, const_iterator __i2, const value_type* __s, size_type __n);
1574 basic_string& replace(const_iterator __i1, const_iterator __i2, size_type __n, value_type __c);
1588 size_type copy(value_type* __s, size_type __n, size_type __pos = 0) const;
1590 basic_string substr(size_type __pos = 0, size_type __n = npos) const;
1607 size_type find(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
1614 size_type rfind(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
1621 size_type find_first_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
1629 size_type find_last_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
1637 …size_type find_first_not_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
1645 … size_type find_last_not_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
1670 bool __addable(const const_iterator* __i, ptrdiff_t __n) const;
1671 bool __subscriptable(const const_iterator* __i, ptrdiff_t __n) const;
1781 void __init(size_type __n, value_type __c);
2021 basic_string<_CharT, _Traits, _Allocator>::basic_string(const value_type* __s, size_type __n)
2023 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "basic_string(const char*, n) detected nullptr");
2024 __init(__s, __n);
2032 basic_string<_CharT, _Traits, _Allocator>::basic_string(const value_type* __s, size_type __n, const…
2035 …_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "basic_string(const char*, n, allocator) detected nullp…
2036 __init(__s, __n);
2107 basic_string<_CharT, _Traits, _Allocator>::__init(size_type __n, value_type __c)
2109 if (__n > max_size())
2112 if (__n < __min_cap)
2114 __set_short_size(__n);
2119 size_type __cap = __recommend(__n);
2123 __set_long_size(__n);
2125 traits_type::assign(_VSTD::__to_raw_pointer(__p), __n, __c);
2126 traits_type::assign(__p[__n], value_type());
2131 basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, value_type __c)
2133 __init(__n, __c);
2141 basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, value_type __c, const alloca…
2144 __init(__n, __c);
2151 …harT, _Traits, _Allocator>::basic_string(const basic_string& __str, size_type __pos, size_type __n,
2158 __init(__str.data() + __pos, _VSTD::min(__n, __str_sz - __pos));
2347 basic_string<_CharT, _Traits, _Allocator>::assign(const value_type* __s, size_type __n)
2349 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::assign received nullptr");
2351 if (__cap >= __n)
2354 traits_type::move(__p, __s, __n);
2355 traits_type::assign(__p[__n], value_type());
2356 __set_size(__n);
2357 __invalidate_iterators_past(__n);
2362 __grow_by_and_replace(__cap, __n - __cap, __sz, 0, __sz, __n, __s);
2369 basic_string<_CharT, _Traits, _Allocator>::assign(size_type __n, value_type __c)
2372 if (__cap < __n)
2375 __grow_by(__cap, __n - __cap, __sz, 0, __sz);
2378 __invalidate_iterators_past(__n);
2380 traits_type::assign(__p, __n, __c);
2381 traits_type::assign(__p[__n], value_type());
2382 __set_size(__n);
2484 size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
2486 if (__cap < __n)
2489 __grow_by(__cap, __n - __cap, __sz, 0, __sz);
2492 __invalidate_iterators_past(__n);
2497 __set_size(__n);
2511 …ing<_CharT, _Traits, _Allocator>::assign(const basic_string& __str, size_type __pos, size_type __n)
2516 return assign(__str.data() + __pos, _VSTD::min(__n, __sz - __pos));
2531 basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s, size_type __n)
2533 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::append received nullptr");
2536 if (__cap - __sz >= __n)
2538 if (__n)
2541 traits_type::copy(__p + __sz, __s, __n);
2542 __sz += __n;
2548 __grow_by_and_replace(__cap, __sz + __n - __cap, __sz, __sz, 0, __n, __s);
2554 basic_string<_CharT, _Traits, _Allocator>::append(size_type __n, value_type __c)
2556 if (__n)
2560 if (__cap - __sz < __n)
2561 __grow_by(__cap, __sz + __n - __cap, __sz, __sz, 0);
2563 traits_type::assign(_VSTD::__to_raw_pointer(__p) + __sz, __n, __c);
2564 __sz += __n;
2634 size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
2635 if (__n)
2637 if (__cap - __sz < __n)
2638 __grow_by(__cap, __sz + __n - __cap, __sz, __sz, 0);
2643 __set_size(__sz + __n);
2658 …ing<_CharT, _Traits, _Allocator>::append(const basic_string& __str, size_type __pos, size_type __n)
2663 return append(__str.data() + __pos, _VSTD::min(__n, __sz - __pos));
2678 …_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, const value_type* __s, size_type __n)
2680 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::insert received nullptr");
2685 if (__cap - __sz >= __n)
2687 if (__n)
2694 __s += __n;
2695 traits_type::move(__p + __pos + __n, __p + __pos, __n_move);
2697 traits_type::move(__p + __pos, __s, __n);
2698 __sz += __n;
2704 __grow_by_and_replace(__cap, __sz + __n - __cap, __sz, __pos, 0, __n, __s);
2710 basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, size_type __n, value_type __c)
2715 if (__n)
2719 if (__cap - __sz >= __n)
2724 traits_type::move(__p + __pos + __n, __p + __pos, __n_move);
2728 __grow_by(__cap, __sz + __n - __cap, __sz, __pos, 0, __n);
2731 traits_type::assign(__p + __pos, __n, __c);
2732 __sz += __n;
2784 size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
2785 if (__n)
2788 if (__cap - __sz >= __n)
2793 traits_type::move(__p + __ip + __n, __p + __ip, __n_move);
2797 __grow_by(__cap, __sz + __n - __cap, __sz, __ip, 0, __n);
2800 __sz += __n;
2820 size_type __pos2, size_type __n)
2825 return insert(__pos1, __str.data() + __pos2, _VSTD::min(__n, __str_sz - __pos2));
2865 basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, size_type __n, value_type _…
2873 insert(static_cast<size_type>(__p), __n, __c);
3031 …Allocator>::replace(const_iterator __i1, const_iterator __i2, const value_type* __s, size_type __n)
3033 …urn replace(static_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1), __s, __n);
3047 …aits, _Allocator>::replace(const_iterator __i1, const_iterator __i2, size_type __n, value_type __c)
3049 …return replace(static_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1), __n, _…
3056 basic_string<_CharT, _Traits, _Allocator>::erase(size_type __pos, size_type __n)
3061 if (__n)
3064 __n = _VSTD::min(__n, __sz - __pos);
3065 size_type __n_move = __sz - __pos - __n;
3067 traits_type::move(__p + __pos, __p + __pos + __n, __n_move);
3068 __sz -= __n;
3171 basic_string<_CharT, _Traits, _Allocator>::resize(size_type __n, value_type __c)
3174 if (__n > __sz)
3175 append(__n - __sz, __c);
3177 __erase_to_end(__n);
3276 basic_string<_CharT, _Traits, _Allocator>::at(size_type __n) const
3278 if (__n >= size())
3280 return (*this)[__n];
3285 basic_string<_CharT, _Traits, _Allocator>::at(size_type __n)
3287 if (__n >= size())
3289 return (*this)[__n];
3330 basic_string<_CharT, _Traits, _Allocator>::copy(value_type* __s, size_type __n, size_type __pos) co…
3335 size_type __rlen = _VSTD::min(__n, __sz - __pos);
3343 basic_string<_CharT, _Traits, _Allocator>::substr(size_type __pos, size_type __n) const
3345 return basic_string(*this, __pos, __n, __alloc());
3381 size_type __n) const _NOEXCEPT
3383 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find(): received nullptr");
3385 (data(), size(), __s, __pos, __n);
3424 size_type __n) const _NOEXCEPT
3426 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::rfind(): received nullptr");
3428 (data(), size(), __s, __pos, __n);
3467 size_type __n) const _NOEXCEPT
3469 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_first_of(): received nullptr");
3471 (data(), size(), __s, __pos, __n);
3510 size_type __n) const _NOEXCEPT
3512 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_last_of(): received nullptr");
3514 (data(), size(), __s, __pos, __n);
3553 size_type __n) const _NOEXCEPT
3555 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_first_not_of(): received nullptr");
3557 (data(), size(), __s, __pos, __n);
3597 size_type __n) const _NOEXCEPT
3599 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_last_not_of(): received nullptr");
3601 (data(), size(), __s, __pos, __n);
4194 basic_string<_CharT, _Traits, _Allocator>::__addable(const const_iterator* __i, ptrdiff_t __n) const
4196 const value_type* __p = _VSTD::__to_raw_pointer(__i->base()) + __n;
4202 basic_string<_CharT, _Traits, _Allocator>::__subscriptable(const const_iterator* __i, ptrdiff_t __n
4204 const value_type* __p = _VSTD::__to_raw_pointer(__i->base()) + __n;