[#BloombergLP-bdlb-String-strrstr] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/String.adoc[String]::strrstr :relfileprefix: ../../../ :mrdocs: Return the last occurrence of `subString` in `string`, or 0. == Synopsis Declared in `<bdlb_string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static char const* strrstr( char const* string, int stringLen, char const* subString, int subStringLen); ---- == Description Return the address providing non‐modifiable access to the last position in the specified `string` having `stringLen` characters at which the specified `subString` having `subStringLen` characters is found, or 0 if there is no such position. If `subStringLen` is 0, `subString` may be null and `string + stringLen` is returned. The behavior is undefined unless `0 <= stringLen` and `0 <= subStringLen`. See {`bdlb_stringviewutil`} for an identically named method having similar semantics taking (and returning) `bsl::string_view`. == Return Value address of the last match, or 0 if not found == Parameters [cols="1,4"] |=== | Name| Description | *string* | haystack string | *stringLen* | length of `string` | *subString* | needle substring | *subStringLen* | length of `subString` |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#