[#BloombergLP-bdlb-StringViewUtil-findFirstOf]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/StringViewUtil.adoc[StringViewUtil]::findFirstOf
:relfileprefix: ../../../
:mrdocs:

Return the position of the first character from `characters`&period;

== Synopsis

Declared in `&lt;bdlb&lowbar;stringviewutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdlb/StringViewUtil/size_type.adoc[size&lowbar;type]
findFirstOf(
    std::string&lowbar;view const& string,
    std::string&lowbar;view const& characters,
    xref:BloombergLP/bdlb/StringViewUtil/size_type.adoc[size&lowbar;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&lowbar;NPOS` otherwise&period;

== Return Value

position of the first match, or `k&lowbar;NPOS`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *string*
| string view to search
| *characters*
| set of characters to match
| *position*
| starting index for the search (default 0)
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
