string::find_first_of
Find the first character present in the specified string.
Synopsis
std::size_t
find_first_of(
string_view sv,
std::size_t pos = 0) const noexcept;
Description
Search from pos
onward for the first character in this string that is equal to any of the characters of sv
.
Complexity
Linear in size()
+ sv.size()
.
Exception Safety
No-throw guarantee.
Return Value
The index of the found character, or npos
if none exists.
Parameters
Name | Description |
---|---|
|
The characters to search for. |
|
The index to start searching at. |