static const char_type* find( const char_type* p, std::size_t count, const char_type& ch ); | (until C++17) | |
static constexpr const char_type* find( const char_type* p, std::size_t count, const char_type& ch ); | (since C++17) |
Searches for character ch within the first count characters of the sequence pointed to by p.
| p | - | pointer to a character string to search |
| count | - | the number of characters to analyze |
| ch | - | the character to search for |
A pointer to the first character in the range specified by [p, p + count) that compares equal to ch, or a null pointer if not found.
Throws nothing.
Linear in count.
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/string/char_traits/find