数据结构示例之查找子字符串的起始位置

如下为“查找子字符串的起始位置”的简单示例3d 1. 用c语言实现的版本code #include <stdio.h> #include <string.h> /* 查找子字符串的起始位置 */ int nfind(char *strSrc, char *strFind) { int i = 0, j = -1; int lastSrcPos = strlen(strSrc) - 1;
相关文章
相关标签/搜索