[#bsl-basic_string-0faf-rfind-0c] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-0faf.adoc[basic_string]::rfind :relfileprefix: ../../ :mrdocs: `rfind` overloads == Synopses Declared in `<bslstl_string.h>` Find the last occurrence of a sequence in this string. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0faf/size_type.adoc[size_type] xref:bsl/basic_string-0faf/rfind-011.adoc[rfind]( CHAR_TYPE character, xref:bsl/basic_string-0faf/size_type.adoc[size_type] position = npos) const; ---- [.small]#xref:bsl/basic_string-0faf/rfind-011.adoc[_» more..._]# Return the last occurrence of the specified `substring` in this string. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0faf/size_type.adoc[size_type] xref:bsl/basic_string-0faf/rfind-0d6.adoc[rfind]( xref:bsl/basic_string-0faf.adoc[basic_string] const& substring, xref:bsl/basic_string-0faf/size_type.adoc[size_type] position = npos) const noexcept; ---- [.small]#xref:bsl/basic_string-0faf/rfind-0d6.adoc[_» more..._]# Same as the three‐argument `rfind` overload with default position. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0faf/size_type.adoc[size_type] xref:bsl/basic_string-0faf/rfind-0d2.adoc[rfind]( CHAR_TYPE const* characterString, xref:bsl/basic_string-0faf/size_type.adoc[size_type] position = npos) const; ---- [.small]#xref:bsl/basic_string-0faf/rfind-0d2.adoc[_» more..._]# Find the last occurrence of a sequence in this string. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class STRING_VIEW_LIKE_TYPE> xref:bsl/basic_string-0faf/size_type.adoc[size_type] xref:bsl/basic_string-0faf/rfind-04.adoc[rfind]( STRING_VIEW_LIKE_TYPE const& substring, xref:bsl/basic_string-0faf/size_type.adoc[size_type] position = npos) const noexcept(true); ---- [.small]#xref:bsl/basic_string-0faf/rfind-04.adoc[_» more..._]# Find the last occurrence of a sequence in this string. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0faf/size_type.adoc[size_type] xref:bsl/basic_string-0faf/rfind-01a.adoc[rfind]( CHAR_TYPE const* characterString, xref:bsl/basic_string-0faf/size_type.adoc[size_type] position, xref:bsl/basic_string-0faf/size_type.adoc[size_type] numChars) const; ---- [.small]#xref:bsl/basic_string-0faf/rfind-01a.adoc[_» more..._]# == Return Value position of the match, or `npos` if not found == Parameters [cols="1,4"] |=== | Name| Description | *character* | character value | *position* | starting index | *substring* | substring to search for | *characterString* | pointer to characters | *numChars* | number of characters |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#