std::experi..._view::find(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

✨ std::experi..._view::find(3) ✨

okay so bestie, this is the std::experi..._view::find(3) page from the C++ Standard Libary manual πŸ’– it’s all about std::experimental::basic_string_view::find, and it is literally here to help you find the first substring matching the character sequence you give it. no cap. πŸ¦‹


πŸ’– NAME πŸ’–

std::experimental::basic_string_view::find β€” std::experimental::basic_string_view::find


πŸ“œ Synopsis πŸ“œ

Finds the first substring equal to the given character sequence. periodt.

(1) (library fundamentals TS)

constexpr size_type find(basic_string_view v, size_type pos = 0) const noexcept;

(2) (library fundamentals TS)

constexpr size_type find(CharT c, size_type pos = 0) const noexcept;

(3) (library fundamentals TS)

constexpr size_type find(const CharT* s, size_type pos, size_type count) const;

(4) (library fundamentals TS)

constexpr size_type find(const CharT* s, size_type pos = 0) const;
  1. Finds the first occurrence of v in this view, starting at position pos.
  2. Equivalent to find(basic_string_view(&c, 1), pos).
  3. Equivalent to find(basic_string_view(s, count), pos).
  4. Equivalent to find(basic_string_view(s), pos).

🌸 Parameters 🌸

  • v β€” view to search for
  • pos β€” position at which to start the search
  • count β€” length of substring to search for
  • s β€” pointer to a character string to search for
  • ch β€” character to search for

πŸŽ€ Return value πŸŽ€

Position of the first character of the found substring, or npos if no such substring is found. that’s the whole mood. πŸ’…


⚑ Complexity ⚑

O(size() * v.size()) at worst. at worst, bestie β€” write that down. 😭


πŸ‘€ See also πŸ‘€

  • rfind β€” find the last occurrence of a substring (public member function)
  • find_first_of β€” find first occurrence of characters (public member function)
  • find_last_of β€” find last occurrence of characters (public member function)
  • find_first_not_of β€” find first absence of characters (public member function)
  • find_last_not_of β€” find last absence of characters (public member function)

πŸ—‚οΈ Category: πŸ—‚οΈ

  • * Noindexed pages

mwah πŸ’‹ source: http://cppreference.com, version/date: 2024.06.10 β€” that’s the cute little footer this page came with, bestie 🫢

πŸ“¦ where this page comes from