数据结构算法4.5版本不涉及其他串操作的索引
发布时间
阅读量:
阅读量
//求子串位置的定位函数
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define OK 1
#define ERROR 0
#define TRUE 1
#define FALSE 0
#define OVERFLOW -2
#define MAXSTRLEN 255
#define MAXSIZE 40 //最大字符串
typedef int Status;
typedef unsigned char SString[MAXSTRLEN +1];
/*******************************声明部分****************************************/
int Index(SString S,SString T,int pos);
//返回子串T在主串S中第pos个字符之后的位置。若不存在,则函数值为0
//其中,T非空,1<= pos <= StrLength(S)
Status StrAssign(SString T,char *chars);
//生成一个其值
全部评论 (0)
还没有任何评论哟~
