[#bsl-basic_string-0f3-rfind-08]
= xref:bsl.adoc[bsl]::xref:bsl/basic_string-0f3.adoc[basic&lowbar;string&lt;char32&lowbar;t&gt;]::rfind
:relfileprefix: ../../
:mrdocs:

Return the starting position of the _last_ occurrence of the specified `substring` within this string, if such a sequence can be found in this string (on or _before_ the optionally specified `position` if such a `position` is specified) using `CHAR&lowbar;TRAITS&colon;&colon;eq` to compare characters, and return `npos` otherwise&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;string&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/basic_string-0f3/size_type.adoc[size&lowbar;type]
rfind(
    xref:bsl/basic_string-0faf.adoc[basic&lowbar;string&lt;char32&lowbar;t&gt;] const& substring,
    xref:bsl/basic_string-0f3/size_type.adoc[size&lowbar;type] position = npos) const noexcept;
----


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