Lines Matching refs:__s
264 __char_traits_length_checked(const typename _Traits::char_type* __s) _NOEXCEPT {
267 … __s != nullptr, "null pointer passed to non-null argument of char_traits<...>::length"),
268 _Traits::length(__s);
306 …_LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI basic_string_view(const _CharT* __s, size_type __len) _NOE…
307 : __data_(__s),
316 … __len == 0 || __s != nullptr, "string_view::string_view(_CharT *, size_t): received nullptr");
340 _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI basic_string_view(const _CharT* __s)
341 : __data_(__s), __size_(std::__char_traits_length_checked<_Traits>(__s)) {}
439 copy(_CharT* __s, size_type __n, size_type __pos = 0) const {
443 _Traits::copy(__s, data() + __pos, __rlen);
470 …_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI int compare(const _CharT* __s) const _NOEXCEPT…
471 return compare(basic_string_view(__s));
475 compare(size_type __pos1, size_type __n1, const _CharT* __s) const {
476 return substr(__pos1, __n1).compare(basic_string_view(__s));
480 compare(size_type __pos1, size_type __n1, const _CharT* __s, size_type __n2) const {
481 return substr(__pos1, __n1).compare(basic_string_view(__s, __n2));
486 find(basic_string_view __s, size_type __pos = 0) const _NOEXCEPT {
487 …_LIBCPP_ASSERT_NON_NULL(__s.size() == 0 || __s.data() != nullptr, "string_view::find(): received n…
488 …_str_find<value_type, size_type, traits_type, npos>(data(), size(), __s.data(), __pos, __s.size());
496 find(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
497 _LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string_view::find(): received nullptr");
498 … return std::__str_find<value_type, size_type, traits_type, npos>(data(), size(), __s, __pos, __n);
502 find(const _CharT* __s, size_type __pos = 0) const _NOEXCEPT {
503 _LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string_view::find(): received nullptr");
505 data(), size(), __s, __pos, traits_type::length(__s));
510 rfind(basic_string_view __s, size_type __pos = npos) const _NOEXCEPT {
511 …_LIBCPP_ASSERT_NON_NULL(__s.size() == 0 || __s.data() != nullptr, "string_view::find(): received n…
512 …str_rfind<value_type, size_type, traits_type, npos>(data(), size(), __s.data(), __pos, __s.size());
521 rfind(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
522 _LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string_view::rfind(): received nullptr");
523 …return std::__str_rfind<value_type, size_type, traits_type, npos>(data(), size(), __s, __pos, __n);
527 rfind(const _CharT* __s, size_type __pos = npos) const _NOEXCEPT {
528 _LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string_view::rfind(): received nullptr");
530 data(), size(), __s, __pos, traits_type::length(__s));
535 find_first_of(basic_string_view __s, size_type __pos = 0) const _NOEXCEPT {
536 …_LIBCPP_ASSERT_NON_NULL(__s.size() == 0 || __s.data() != nullptr, "string_view::find_first_of(): r…
538 data(), size(), __s.data(), __pos, __s.size());
547 find_first_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
548 …_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string_view::find_first_of(): received nullpt…
549 …return std::__str_find_first_of<value_type, size_type, traits_type, npos>(data(), size(), __s, __p…
553 find_first_of(const _CharT* __s, size_type __pos = 0) const _NOEXCEPT {
554 _LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string_view::find_first_of(): received nullptr");
556 data(), size(), __s, __pos, traits_type::length(__s));
561 find_last_of(basic_string_view __s, size_type __pos = npos) const _NOEXCEPT {
562 …_LIBCPP_ASSERT_NON_NULL(__s.size() == 0 || __s.data() != nullptr, "string_view::find_last_of(): re…
564 data(), size(), __s.data(), __pos, __s.size());
573 find_last_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
574 …_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string_view::find_last_of(): received nullptr…
575 …return std::__str_find_last_of<value_type, size_type, traits_type, npos>(data(), size(), __s, __po…
579 find_last_of(const _CharT* __s, size_type __pos = npos) const _NOEXCEPT {
580 _LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string_view::find_last_of(): received nullptr");
582 data(), size(), __s, __pos, traits_type::length(__s));
587 find_first_not_of(basic_string_view __s, size_type __pos = 0) const _NOEXCEPT {
589 … __s.size() == 0 || __s.data() != nullptr, "string_view::find_first_not_of(): received nullptr");
591 data(), size(), __s.data(), __pos, __s.size());
600 find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
601 …_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string_view::find_first_not_of(): received nu…
602 …__str_find_first_not_of<value_type, size_type, traits_type, npos>(data(), size(), __s, __pos, __n);
606 find_first_not_of(const _CharT* __s, size_type __pos = 0) const _NOEXCEPT {
607 _LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string_view::find_first_not_of(): received nullptr");
609 data(), size(), __s, __pos, traits_type::length(__s));
614 find_last_not_of(basic_string_view __s, size_type __pos = npos) const _NOEXCEPT {
616 … __s.size() == 0 || __s.data() != nullptr, "string_view::find_last_not_of(): received nullptr");
618 data(), size(), __s.data(), __pos, __s.size());
627 find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT {
628 …_LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string_view::find_last_not_of(): received nul…
629 …:__str_find_last_not_of<value_type, size_type, traits_type, npos>(data(), size(), __s, __pos, __n);
633 find_last_not_of(const _CharT* __s, size_type __pos = npos) const _NOEXCEPT {
634 _LIBCPP_ASSERT_NON_NULL(__s != nullptr, "string_view::find_last_not_of(): received nullptr");
636 data(), size(), __s, __pos, traits_type::length(__s));
640 constexpr _LIBCPP_HIDE_FROM_ABI bool starts_with(basic_string_view __s) const noexcept {
641 return size() >= __s.size() && compare(0, __s.size(), __s) == 0;
648 constexpr _LIBCPP_HIDE_FROM_ABI bool starts_with(const value_type* __s) const noexcept {
649 return starts_with(basic_string_view(__s));
652 constexpr _LIBCPP_HIDE_FROM_ABI bool ends_with(basic_string_view __s) const noexcept {
653 return size() >= __s.size() && compare(size() - __s.size(), npos, __s) == 0;
660 constexpr _LIBCPP_HIDE_FROM_ABI bool ends_with(const value_type* __s) const noexcept {
661 return ends_with(basic_string_view(__s));
670 …constexpr _LIBCPP_HIDE_FROM_ABI bool contains(const value_type* __s) const { return find(__s) != n…