Return the position of the first character from characters.
Synopsis
Declared in <bdlb_stringviewutil.h>
static
size_type
findFirstOf(
std::string_view const& string,
std::string_view const& characters,
size_type position = 0);
Description
Return the position of the first occurrence of a character belonging to the specified characters, if such an occurrence can can be found in the specified string (on or after the optionally specified position if such a position is specified), and return k_NPOS otherwise.
Return Value
position of the first match, or k_NPOS
Parameters
Name |
Description |
string |
string view to search |
characters |
set of characters to match |
position |
starting index for the search (default 0) |
Created with MrDocs