获取一个字符串的长度

int strlen(str);

示例

int len;
str s="abc";
len=strlen(s);  //len=3
len=strlen("中国");  //len=4

注意