strlen函数
#include <stdio.h>
int mystrlen(char *n)
{
int i=0;
while(*n)
{
i++;
n++;
}
return i;
}
int main()
{
char n[20]={"I love china";}
int s=0;
s=mystrlen(n);
printf("%d\n",s);
return 0;
}
标签:mystrlen,函数,int,char,++,return,strlen
From: https://www.cnblogs.com/yesiming/p/17435749.html