zen*_*hoy 5 c++ c++11
缩短 a 时std::string,基本上有两种可能性:string.resize(length)或string.erase(length)。
std::string
string.resize(length)
string.erase(length)
鉴于我们知道字符串会变小,那么两者之间有什么区别?
Rom*_*sev 2
resize
length > current
length < current
erase
归档时间:
10 年 前
查看次数:
702 次
最近记录: