#include "string.h"
#include "stdio.h"
#define N 255
typedef struct string
{
char ch[N];
int len;
}STRING;
int Leng(STRING s)
{
int i=0;
int j=0;
while(s.ch[i]!='\0')
{
i++;
j++;
}
return(j);
}
STRING Substring(STRING s,int n1,int n2)
{
STRING str;
int i;
for(i=0;i<=n2;i++)
str.ch[i]=s.ch[n1+i-1];
str.len=n2;
str.ch[i]='\0';
return(str);
}
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余3页未读,立即下载