开发者

Is there any Qt container that returns its values as comma separated string?

In Qt, does one of the containers give me the option to return a comma-se开发者_运维技巧parated string from its values?


If your elements are QStrings, you can use QStringList::join():

QStringList list;
list << "one" << "two" << "three";
QString s = list.join(",");
// s == "one,two,three"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜