字符串定义
获取所有子串位置
int index = str.indexOf(child);
while(-1 != index){
qDebug()<<"index"<<index;
index = str.indexOf(child,index+1);
}
删除所有子串
index = str.indexOf(child);
while(-1 != index){
str.remove(index,child.length());
index = str.indexOf(child);
}
qDebug()<<str;
输出
index 4
index 11
"qwe t dfd fgg"