int getStrLength(char* str) { int i = 0; while (str[i] != '\0') { i++; } return i; } 转载于:https://www.cnblogs.com/NULL-ROOT/p/10533224.html