• Home
  • Raw
  • Download

Lines Matching refs:string_view

51 using string_view = std::string_view;  variable
159 class string_view {
177 constexpr string_view() noexcept : ptr_(nullptr), length_(0) {} in string_view() function
182 string_view( // NOLINT(runtime/explicit) in string_view() function
187 : string_view(str.data(), str.size()) {} in string_view()
192 constexpr string_view(const char* str) // NOLINT(runtime/explicit) in string_view() function
197 constexpr string_view(const char* data, size_type len) in string_view() function
354 void swap(string_view& s) noexcept { in swap()
391 constexpr string_view substr(size_type pos, size_type n = npos) const {
395 string_view())
396 : string_view(ptr_ + pos, Min(n, length_ - pos));
407 constexpr int compare(string_view x) const noexcept { in compare()
417 int compare(size_type pos1, size_type count1, string_view v) const { in compare()
423 int compare(size_type pos1, size_type count1, string_view v, size_type pos2, in compare()
430 int compare(const char* s) const { return compare(string_view(s)); } in compare()
435 return substr(pos1, count1).compare(string_view(s)); in compare()
442 return substr(pos1, count1).compare(string_view(s, count2)); in compare()
452 size_type find(string_view s, size_type pos = 0) const noexcept;
463 size_type rfind(string_view s, size_type pos = npos) const
475 size_type find_first_of(string_view s, size_type pos = 0) const
490 size_type find_last_of(string_view s, size_type pos = npos) const
505 size_type find_first_not_of(string_view s, size_type pos = 0) const noexcept;
516 size_type find_last_not_of(string_view s,
568 constexpr bool operator==(string_view x, string_view y) noexcept {
574 constexpr bool operator!=(string_view x, string_view y) noexcept {
578 constexpr bool operator<(string_view x, string_view y) noexcept {
582 constexpr bool operator>(string_view x, string_view y) noexcept {
586 constexpr bool operator<=(string_view x, string_view y) noexcept {
590 constexpr bool operator>=(string_view x, string_view y) noexcept {
595 std::ostream& operator<<(std::ostream& o, string_view piece);
611 inline string_view ClippedSubstr(string_view s, size_t pos,
612 size_t n = string_view::npos) {
622 constexpr string_view NullSafeStringView(const char* p) { in NullSafeStringView()
623 return p ? string_view(p) : string_view(); in NullSafeStringView()