Return the position of the first matching character in string.
Declared in <bdlb_stringrefutil.h>
static
size_type
findFirstOf(
bslstl::StringRef const& string,
bslstl::StringRef const& characters,
size_type position = 0u);
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.
index of the first match, or k_NPOS
| Name | Description |
|---|---|
| string | string to search |
| characters | characters to match |
| position | lowest index to consider |