/*
**在字符串s1中查找字符串s2最右出现的位置,并返回一个指向该位置的指针
*/
#include <string.h>
#include <stdio.h>
char*
my_strrstr(char const* s1, char const* s2)
{
char* current;
char* last;
last = NULL;
if (*s2 != '\0') {
current = strstr(s1, s2);
while (current != NULL) {
last = current;
current = strstr(last + 1, s2);
}
}
return last;
}