Lines Matching refs:__n

92     int compare(const char_type* __s1, const char_type* __s2, size_t __n);
96 const char_type* find(const char_type* __s, size_t __n, const char_type& __a);
97 static char_type* move(char_type* __s1, const char_type* __s2, size_t __n);
99 static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n);
101 static char_type* assign(char_type* __s, size_t __n, char_type __a);
117 char_traits<_CharT>::compare(const char_type* __s1, const char_type* __s2, size_t __n)
119 for (; __n; --__n, ++__s1, ++__s2)
143 char_traits<_CharT>::find(const char_type* __s, size_t __n, const char_type& __a)
145 for (; __n; --__n)
156 char_traits<_CharT>::move(char_type* __s1, const char_type* __s2, size_t __n)
161 for (; __n; --__n, ++__s1, ++__s2)
166 __s1 += __n;
167 __s2 += __n;
168 for (; __n; --__n)
177 char_traits<_CharT>::copy(char_type* __s1, const char_type* __s2, size_t __n)
179 _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
181 for (; __n; --__n, ++__s1, ++__s2)
189 char_traits<_CharT>::assign(char_type* __s, size_t __n, char_type __a)
192 for (; __n; --__n, ++__s)
216 int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
220 const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT;
221 static inline char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
222 {return __n == 0 ? __s1 : (char_type*) memmove(__s1, __s2, __n);}
223 static inline char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
225 _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
226 return __n == 0 ? __s1 : (char_type*)memcpy(__s1, __s2, __n);
228 static inline char_type* assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT
229 {return __n == 0 ? __s : (char_type*)memset(__s, to_int_type(__a), __n);}
245 char_traits<char>::compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
247 if (__n == 0)
250 return __builtin_memcmp(__s1, __s2, __n);
252 return memcmp(__s1, __s2, __n);
254 for (; __n; --__n, ++__s1, ++__s2)
267 char_traits<char>::find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT
269 if (__n == 0)
272 return __builtin_char_memchr(__s, to_int_type(__a), __n);
274 return (const char_type*) memchr(__s, to_int_type(__a), __n);
276 for (; __n; --__n)
306 int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
310 const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT;
311 static inline char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
312 {return __n == 0 ? __s1 : (char_type*)wmemmove(__s1, __s2, __n);}
313 static inline char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
315 _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
316 return __n == 0 ? __s1 : (char_type*)wmemcpy(__s1, __s2, __n);
318 static inline char_type* assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT
319 {return __n == 0 ? __s : (char_type*)wmemset(__s, __a, __n);}
335 char_traits<wchar_t>::compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
337 if (__n == 0)
340 return __builtin_wmemcmp(__s1, __s2, __n);
342 return wmemcmp(__s1, __s2, __n);
344 for (; __n; --__n, ++__s1, ++__s2)
373 char_traits<wchar_t>::find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT
375 if (__n == 0)
378 return __builtin_wmemchr(__s, __a, __n);
380 return wmemchr(__s, __a, __n);
382 for (; __n; --__n)
412 int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
418 const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT;
420 static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
421 {return __n == 0 ? __s1 : (char_type*) memmove(__s1, __s2, __n);}
423 static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
425 _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
426 return __n == 0 ? __s1 : (char_type*)memcpy(__s1, __s2, __n);
429 static char_type* assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT
430 {return __n == 0 ? __s : (char_type*)memset(__s, to_int_type(__a), __n);}
457 char_traits<char8_t>::compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
460 return __builtin_memcmp(__s1, __s2, __n);
462 for (; __n; --__n, ++__s1, ++__s2)
476 char_traits<char8_t>::find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT
478 for (; __n; --__n)
508 int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
512 const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT;
514 static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
516 static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
518 static char_type* assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT;
534 char_traits<char16_t>::compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
536 for (; __n; --__n, ++__s1, ++__s2)
558 char_traits<char16_t>::find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT
560 for (; __n; --__n)
571 char_traits<char16_t>::move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
576 for (; __n; --__n, ++__s1, ++__s2)
581 __s1 += __n;
582 __s2 += __n;
583 for (; __n; --__n)
591 char_traits<char16_t>::copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
593 _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
595 for (; __n; --__n, ++__s1, ++__s2)
602 char_traits<char16_t>::assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT
605 for (; __n; --__n, ++__s)
627 int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
631 const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT;
633 static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
635 static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
637 static char_type* assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT;
653 char_traits<char32_t>::compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
655 for (; __n; --__n, ++__s1, ++__s2)
677 char_traits<char32_t>::find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT
679 for (; __n; --__n)
690 char_traits<char32_t>::move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
695 for (; __n; --__n, ++__s1, ++__s2)
700 __s1 += __n;
701 __s2 += __n;
702 for (; __n; --__n)
710 char_traits<char32_t>::copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
712 _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
714 for (; __n; --__n, ++__s1, ++__s2)
721 char_traits<char32_t>::assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT
724 for (; __n; --__n, ++__s)
789 const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
794 if (__n == 0) // There is nothing to search, just return __pos.
798 __p + __pos, __p + __sz, __s, __s + __n);
830 const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
833 if (__n < __sz - __pos)
834 __pos += __n;
838 __p, __p + __pos, __s, __s + __n, _Traits::eq,
840 if (__n > 0 && __r == __p + __pos)
849 const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
851 if (__pos >= __sz || __n == 0)
854 (__p + __pos, __p + __sz, __s, __s + __n, _Traits::eq );
865 const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
867 if (__n != 0)
875 const _CharT* __r = _Traits::find(__s, __n, *--__ps);
888 const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
894 if (_Traits::find(__s, __n, *__ps) == 0)
921 const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
928 if (_Traits::find(__s, __n, *--__ps) == 0)