// 模拟库函数strstr #include <stdio.h> #include <assert.h> const char* my_strstr(const char *parent, const char *child) { const char *pgo = parent; const char *cgo = child; const char *pgos = parent; assert(parent != NULL && child != NULL); if (!*child) { return NULL; } while (*pgo) { pgo = pgos; cgo = child; while (*pgo == *cgo && *pgo && *cgo) { pgo++; cgo++; } if (*cgo == '