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

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -