append(),追加,等于+=
sprintf()
QString str;
str.sprintf("%s, %d", "hello ", 3);//str=hello 3
insert(), 插入字符串
prepend(), 在开头插入字符串
replace(), 替换字符串
trimmed(), 移除字符串首尾空白字符,包括换行符,制表符
simplified(), 移除首尾空白字符,将中间的连续空白字符合并成一个空格
startsWith(), 判断一个字符串是否以某个字符串开头
append(),追加,等于+=
sprintf()
QString str;
str.sprintf("%s, %d", "hello ", 3);//str=hello 3
insert(), 插入字符串
prepend(), 在开头插入字符串
replace(), 替换字符串
trimmed(), 移除字符串首尾空白字符,包括换行符,制表符
simplified(), 移除首尾空白字符,将中间的连续空白字符合并成一个空格
startsWith(), 判断一个字符串是否以某个字符串开头
来源:https://www.cnblogs.com/xieqianli/p/11386766.html