c++字符串长度怎么算 程序猿 • 2025年12月18日 05:54:48 • 好文分享 • 阅读 0 字符串长度的计算:std::string::length() 方法:如果字符串是 std::string 对象,则使用 length() 方法。strlen() 函数:对于 C 风格的字符串(以’