c++ - QStringList remove spaces from strings -
what best way trimming strings in string list? try use replaceinstrings:
qstringlist somelist; // ... // // add strings // ... // somelist.replaceinstrings(qregexp("^\s*"),"");
but spaces not removed.
as answer told, need escape backslash. want change expression match 1 or more spaces , not 0 or more spaces, try using: qregexp("^\\s+")
Comments
Post a Comment