标签:str nbsp col list class code ring empty art
1、实现效果
QString a = "1,2,3,4,5";
得到
QStringList b = {"1","2","3","4","5"}
2、实现
QString str = "a,,b,c"; QStringList list1 = str.split(‘,‘); // list1: [ "a", "", "b", "c" ] QStringList list2 = str.split(‘,‘, QString::SkipEmptyParts); // list2: [ "a", "b", "c" ]
标签:str nbsp col list class code ring empty art
原文地址:https://www.cnblogs.com/judes/p/13616693.html