std::char_t...aits::find,(3)

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

🌸 NAME 🌸

okay so bestie, this page is std::char_t...aits::find,(3) from the C++ Standard Libary manual β€” and yes, β€œLibary” is exactly how it’s spelled here, we are not fixing it, we are respecting the icon behavior. The name bits are literally:

  • std::char_traits::find,std::char_traits::find, -
  • std::char_traits::find,std::char_traits::find,

(Yes, it says it twice. The page said it twice, so we’re saying it twice. Consistency slay.)


✨ Synopsis ✨

std::char_traits<char32_t>::find

static const char_type*
    find( const char_type* ptr, std::size_t count, const
(constexpr since C++17)
    char_type& ch );

Searches for character ch within the first count characters of the sequence pointed to by ptr.

Also, real talk: see CharTraits for the general requirements on character traits for X::find. That’s the exact cross-reference vibe, no cap.


πŸ’– Parameters πŸ’–

  • ptr β€” pointer to a character string to search
  • count β€” the number of characters to analyze
  • ch β€” the character to search for

πŸŽ€ Return value πŸŽ€

A pointer to the first character in the range specified by [ptr, ptr + count) that compares equal to ch, or a null pointer if not found.


πŸ¦‹ Complexity πŸ¦‹

Linear in count.


cute sign-off: source http://cppreference.com, version/date 2024.06.10, page std::char_t...aits::find,(3). stan cppreference for this one, fr fr. 🫢

πŸ“¦ where this page comes from