Finds the last substring equal to the given character sequence. Search begins at pos, i.e. the found substring must not begin in a position following pos. If npos or any value not smaller than size() is passed as pos, whole string will be searched.

1) Finds the last substring equal to str. If str.size() is zero, returns pos or size()-1, whichever is smaller.

2) Finds the last substring equal to the first count characters of the character string pointed to by s. s can include null characters. If count is zero, returns pos or size()-1, whichever is smaller.

3) Finds the last substring equal to the character string pointed to by s. The length of the string is determined by the first null character. If the length of s is zero, returns pos or size()-1, whichever is smaller.