unsigned int strLength(const char* str) { unsigned int i = 0; while(str[i] != '\0') i++; return i; } 说明:该函数返回一个字符串的长度!