[#llvm-SmallString-rfind-03] = xref:llvm.adoc[llvm]::xref:llvm/SmallString.adoc[SmallString]::rfind :relfileprefix: ../../ :mrdocs: `rfind` overloads == Synopses Declared in `<llvm/ADT/SmallString.h>` Search for the last string `Str` in the string. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] size_t xref:llvm/SmallString/rfind-088.adoc[rfind](xref:llvm/StringRef.adoc[StringRef] Str) const; ---- [.small]#xref:llvm/SmallString/rfind-088.adoc[_» more..._]# Search for the last character `C` in the string. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] size_t xref:llvm/SmallString/rfind-081.adoc[rfind]( char C, size_t From = StringRef::npos) const; ---- [.small]#xref:llvm/SmallString/rfind-081.adoc[_» more..._]# == Return Value * The index of the last occurrence of `Str,` or npos if not found. * The index of the last occurrence of `C,` or npos if not found. [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Parameters [cols="1,4"] |=== | Name| Description | *Str* | Substring to search for. | *C* | Character to search for. | *From* | Index to start the reverse search from. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#