函数char* strrchr(const char *str, int ch)会在str(const char *)中返回最后一个出现ch的指针(char*)。 因此,我们可以编写以下代码而无需进行任何强制转换: #include <string.h> int main() ...
我正在使用函数strrchr做一些测试,但我无法理解输出: $text = 'This is my code'; echo strrchr($text, 'my'); //my code 好的,该函数返回最后一次出现之前的字符串。 $text = 'This is a test to ...