Lines Matching refs:__s

266 __char_traits_length_checked(const typename _Traits::char_type* __s) _NOEXCEPT {
269__s != nullptr, "null pointer passed to non-null argument of char_traits<...>::length"),
270 _Traits::length(__s);
310 …_LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI basic_string_view(const _CharT* __s, size_type __len) _NOE…
311 : __data_(__s),
321 … __len == 0 || __s != nullptr, "string_view::string_view(_CharT *, size_t): received nullptr");
345 _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI basic_string_view(const _CharT* __s)
346 : __data_(__s), __size_(std::__char_traits_length_checked<_Traits>(__s)) {}
442 copy(_CharT* __s, size_type __n, size_type __pos = 0) const {
446 _Traits::copy(__s, data() + __pos, __rlen);
473 …_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI int compare(const _CharT* __s) const _NOEXCEPT…
474 return compare(basic_string_view(__s));
478 compare(size_type __pos1, size_type __n1, const _CharT* __s) const {
479 return substr(__pos1, __n1).compare(basic_string_view(__s));
483 compare(size_type __pos1, size_type __n1, const _CharT* __s, size_type __n2) const {
484 return substr(__pos1, __n1).compare(basic_string_view(__s, __n2));
489 find(basic_string_view __s, size_type __pos = 0) const _NOEXCEPT {
490 …_LIBCPP_ASSERT_NON_NULL(__s.size() == 0 || __s.data() != nullptr, "string_view::find(): received n…
491 …_str_find<value_type, size_type, traits_type, npos>(data(), size(), __s.data(), __pos, __s.size());
499 find(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
500 _LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string_view::find(): received nullptr");
501 … return std::__str_find<value_type, size_type, traits_type, npos>(data(), size(), __s, __pos, __n);
505 find(const _CharT* __s, size_type __pos = 0) const _NOEXCEPT {
506 _LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string_view::find(): received nullptr");
508 data(), size(), __s, __pos, traits_type::length(__s));
513 rfind(basic_string_view __s, size_type __pos = npos) const _NOEXCEPT {
514 …_LIBCPP_ASSERT_NON_NULL(__s.size() == 0 || __s.data() != nullptr, "string_view::find(): received n…
515 …str_rfind<value_type, size_type, traits_type, npos>(data(), size(), __s.data(), __pos, __s.size());
524 rfind(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
525 _LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string_view::rfind(): received nullptr");
526 …return std::__str_rfind<value_type, size_type, traits_type, npos>(data(), size(), __s, __pos, __n);
530 rfind(const _CharT* __s, size_type __pos = npos) const _NOEXCEPT {
531 _LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string_view::rfind(): received nullptr");
533 data(), size(), __s, __pos, traits_type::length(__s));
538 find_first_of(basic_string_view __s, size_type __pos = 0) const _NOEXCEPT {
539 …_LIBCPP_ASSERT_NON_NULL(__s.size() == 0 || __s.data() != nullptr, "string_view::find_first_of(): r…
541 data(), size(), __s.data(), __pos, __s.size());
550 find_first_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
551 …_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string_view::find_first_of(): received nullpt…
552 …return std::__str_find_first_of<value_type, size_type, traits_type, npos>(data(), size(), __s, __p…
556 find_first_of(const _CharT* __s, size_type __pos = 0) const _NOEXCEPT {
557 _LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string_view::find_first_of(): received nullptr");
559 data(), size(), __s, __pos, traits_type::length(__s));
564 find_last_of(basic_string_view __s, size_type __pos = npos) const _NOEXCEPT {
565 …_LIBCPP_ASSERT_NON_NULL(__s.size() == 0 || __s.data() != nullptr, "string_view::find_last_of(): re…
567 data(), size(), __s.data(), __pos, __s.size());
576 find_last_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
577 …_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string_view::find_last_of(): received nullptr…
578 …return std::__str_find_last_of<value_type, size_type, traits_type, npos>(data(), size(), __s, __po…
582 find_last_of(const _CharT* __s, size_type __pos = npos) const _NOEXCEPT {
583 _LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string_view::find_last_of(): received nullptr");
585 data(), size(), __s, __pos, traits_type::length(__s));
590 find_first_not_of(basic_string_view __s, size_type __pos = 0) const _NOEXCEPT {
592__s.size() == 0 || __s.data() != nullptr, "string_view::find_first_not_of(): received nullptr");
594 data(), size(), __s.data(), __pos, __s.size());
603 find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
604 …_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string_view::find_first_not_of(): received nu…
605 …__str_find_first_not_of<value_type, size_type, traits_type, npos>(data(), size(), __s, __pos, __n);
609 find_first_not_of(const _CharT* __s, size_type __pos = 0) const _NOEXCEPT {
610 _LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string_view::find_first_not_of(): received nullptr");
612 data(), size(), __s, __pos, traits_type::length(__s));
617 find_last_not_of(basic_string_view __s, size_type __pos = npos) const _NOEXCEPT {
619__s.size() == 0 || __s.data() != nullptr, "string_view::find_last_not_of(): received nullptr");
621 data(), size(), __s.data(), __pos, __s.size());
630 find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
631 …_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string_view::find_last_not_of(): received nul…
632 …:__str_find_last_not_of<value_type, size_type, traits_type, npos>(data(), size(), __s, __pos, __n);
636 find_last_not_of(const _CharT* __s, size_type __pos = npos) const _NOEXCEPT {
637 _LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string_view::find_last_not_of(): received nullptr");
639 data(), size(), __s, __pos, traits_type::length(__s));
643 constexpr _LIBCPP_HIDE_FROM_ABI bool starts_with(basic_string_view __s) const noexcept {
644 return size() >= __s.size() && compare(0, __s.size(), __s) == 0;
651 constexpr _LIBCPP_HIDE_FROM_ABI bool starts_with(const value_type* __s) const noexcept {
652 return starts_with(basic_string_view(__s));
655 constexpr _LIBCPP_HIDE_FROM_ABI bool ends_with(basic_string_view __s) const noexcept {
656 return size() >= __s.size() && compare(size() - __s.size(), npos, __s) == 0;
663 constexpr _LIBCPP_HIDE_FROM_ABI bool ends_with(const value_type* __s) const noexcept {
664 return ends_with(basic_string_view(__s));
673 …constexpr _LIBCPP_HIDE_FROM_ABI bool contains(const value_type* __s) const { return find(__s) != n…