C语言求字符串长度

int getStrLength(char* str) {
    int i = 0;
    while (str[i] != '\0') {
        i++;
    }
    return i;

}

 

posted @ 2019-03-14 20:24  NULL_ROOT  阅读(1476)  评论(0编辑  收藏  举报