#include <stdio.h> #include <string.h> int main () { char str[] = "http://www.runoob.com"; char ch = '.'; char *ret = NULL; ret = strchr(str, 'r'); if ( ret == NULL ) { printf("aaaa/n"); } else { if ( strlen(ret+1) == 0 ) { printf("ccc/n"); } printf("[%s]/n",ret+1); } printf("%d/n",strlen("${agent_id}:")); return(0); }
strstr strchr
原创文章,作者:wdmbts,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/269429.html