Return a reference to the last occurrence of subString in string.

Synopsis

Declared in <bdlb_stringrefutil.h>

static
bslstl::StringRef
strrstr(
    bslstl::StringRef const& string,
    bslstl::StringRef const& subString);

Description

Return a bslstl::StringRef object referring to the last occurrence in (the referent data of) the specified string at which (the referent data of) the specified subString is found, or bslstl::StringRef() if there is no such occurrence. If subString has zero length then a zero‐length reference to the end of string is returned (i.e., bslstl::StringRef(string.end(), 0));

Return Value

reference to the last occurrence, or an empty reference

Parameters

Name

Description

string

string to search

subString

substring to find

Created with MrDocs