int substr( char dst[], char src[], int start, int len)
{
int srcindex;
int dstindex;
dstindex = 0;
if ( start >= 0 && len > 0) {
for ( srcindex = 0; srcindex < start && src[srcindex] != '\0'; srcindex += 1)
;
while ( len > 0 && src[index] != '\0') {
dst[dstindex] = src[index];
dstindex += 1;
srcindex += 1;
len -= 1;
}
}
dst[dstindex] = '\0';
return dstindex;
}
7.取字符子串函数实现
最新推荐文章于 2024-09-13 16:12:21 发布