[#BloombergLP-bdlb-StringRefUtil-findLastOf]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/StringRefUtil.adoc[StringRefUtil]::findLastOf
:relfileprefix: ../../../
:mrdocs:

Return the position of the last matching character in `string`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdlb/StringRefUtil/size_type.adoc[size&lowbar;type]
findLastOf(
    xref:BloombergLP/bslstl/StringRef.adoc[bslstl::StringRef] const& string,
    xref:BloombergLP/bslstl/StringRef.adoc[bslstl::StringRef] const& characters,
    xref:BloombergLP/bdlb/StringRefUtil/size_type.adoc[size&lowbar;type] position = k&lowbar;NPOS);
----

== Description

Return the position of the _last_ occurrence of a character belonging to the specified `characters`, if such an occurrence can can be found in the specified `string` (on or _before_ the optionally specified `position` if such a `position` is specified), and return `k&lowbar;NPOS` otherwise&period;

== Return Value

index of the last match, or `k&lowbar;NPOS`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *string*
| string to search
| *characters*
| characters to match
| *position*
| highest index to consider
|===


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