Lines Matching refs:__s
253 inline size_t __char_traits_length_checked(const typename _Traits::char_type* __s) _NOEXCEPT {
255 …return _LIBCPP_ASSERT(__s != nullptr, "null pointer passed to non-null argument of char_traits<...…
301 basic_string_view(const _CharT* __s, size_type __len) _NOEXCEPT
302 : __data(__s), __size(__len)
305 …_LIBCPP_ASSERT(__len == 0 || __s != nullptr, "string_view::string_view(_CharT *, size_t): received…
339 basic_string_view(const _CharT* __s)
340 : __data(__s), __size(_VSTD::__char_traits_length_checked<_Traits>(__s)) {}
442 size_type copy(_CharT* __s, size_type __n, size_type __pos = 0) const
447 _Traits::copy(__s, data() + __pos, __rlen);
482 int compare(const _CharT* __s) const _NOEXCEPT
484 return compare(basic_string_view(__s));
488 int compare(size_type __pos1, size_type __n1, const _CharT* __s) const
490 return substr(__pos1, __n1).compare(basic_string_view(__s));
494 int compare(size_type __pos1, size_type __n1, const _CharT* __s, size_type __n2) const
496 return substr(__pos1, __n1).compare(basic_string_view(__s, __n2));
501 size_type find(basic_string_view __s, size_type __pos = 0) const _NOEXCEPT
503 … _LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find(): received nullptr");
505 (data(), size(), __s.data(), __pos, __s.size());
516 size_type find(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
518 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find(): received nullptr");
520 (data(), size(), __s, __pos, __n);
524 size_type find(const _CharT* __s, size_type __pos = 0) const _NOEXCEPT
526 _LIBCPP_ASSERT(__s != nullptr, "string_view::find(): received nullptr");
528 (data(), size(), __s, __pos, traits_type::length(__s));
533 size_type rfind(basic_string_view __s, size_type __pos = npos) const _NOEXCEPT
535 … _LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find(): received nullptr");
537 (data(), size(), __s.data(), __pos, __s.size());
548 size_type rfind(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
550 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::rfind(): received nullptr");
552 (data(), size(), __s, __pos, __n);
556 size_type rfind(const _CharT* __s, size_type __pos=npos) const _NOEXCEPT
558 _LIBCPP_ASSERT(__s != nullptr, "string_view::rfind(): received nullptr");
560 (data(), size(), __s, __pos, traits_type::length(__s));
565 size_type find_first_of(basic_string_view __s, size_type __pos = 0) const _NOEXCEPT
567 …_LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find_first_of(): received n…
569 (data(), size(), __s.data(), __pos, __s.size());
577 size_type find_first_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
579 … _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find_first_of(): received nullptr");
581 (data(), size(), __s, __pos, __n);
585 size_type find_first_of(const _CharT* __s, size_type __pos=0) const _NOEXCEPT
587 _LIBCPP_ASSERT(__s != nullptr, "string_view::find_first_of(): received nullptr");
589 (data(), size(), __s, __pos, traits_type::length(__s));
594 size_type find_last_of(basic_string_view __s, size_type __pos=npos) const _NOEXCEPT
596 …_LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find_last_of(): received nu…
598 (data(), size(), __s.data(), __pos, __s.size());
606 size_type find_last_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
608 _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find_last_of(): received nullptr");
610 (data(), size(), __s, __pos, __n);
614 size_type find_last_of(const _CharT* __s, size_type __pos=npos) const _NOEXCEPT
616 _LIBCPP_ASSERT(__s != nullptr, "string_view::find_last_of(): received nullptr");
618 (data(), size(), __s, __pos, traits_type::length(__s));
623 size_type find_first_not_of(basic_string_view __s, size_type __pos=0) const _NOEXCEPT
625 …_LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find_first_not_of(): receiv…
627 (data(), size(), __s.data(), __pos, __s.size());
638 size_type find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
640 … _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find_first_not_of(): received nullptr");
642 (data(), size(), __s, __pos, __n);
646 size_type find_first_not_of(const _CharT* __s, size_type __pos=0) const _NOEXCEPT
648 _LIBCPP_ASSERT(__s != nullptr, "string_view::find_first_not_of(): received nullptr");
650 (data(), size(), __s, __pos, traits_type::length(__s));
655 size_type find_last_not_of(basic_string_view __s, size_type __pos=npos) const _NOEXCEPT
657 …_LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find_last_not_of(): receive…
659 (data(), size(), __s.data(), __pos, __s.size());
670 size_type find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
672 … _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find_last_not_of(): received nullptr");
674 (data(), size(), __s, __pos, __n);
678 size_type find_last_not_of(const _CharT* __s, size_type __pos=npos) const _NOEXCEPT
680 _LIBCPP_ASSERT(__s != nullptr, "string_view::find_last_not_of(): received nullptr");
682 (data(), size(), __s, __pos, traits_type::length(__s));
687 bool starts_with(basic_string_view __s) const noexcept
688 { return size() >= __s.size() && compare(0, __s.size(), __s) == 0; }
695 bool starts_with(const value_type* __s) const noexcept
696 { return starts_with(basic_string_view(__s)); }
699 bool ends_with(basic_string_view __s) const noexcept
700 { return size() >= __s.size() && compare(size() - __s.size(), npos, __s) == 0; }
707 bool ends_with(const value_type* __s) const noexcept
708 { return ends_with(basic_string_view(__s)); }
721 bool contains(const value_type* __s) const
722 { return find(__s) != npos; }