Luna::BasicString::rfind

usize rfind(value_type ch, usize pos=npos) const

Finds the first occurrence of the specified character in the string.

Parameters

  • in ch

    The character to search for.

  • in pos

    The index at which to begin searching. The character at pos is included in searching. If pos >= size() (including npos), the search will start from the end of the string.

Return value

Returns the index of the found character. Returns npos if no such occurrence is found.