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

jQuery Ajax Render Fragments OR Whole Page -

Jquery & Rails 3: Run controller action from js file? -

jquery - Creating xls in javascript using ActiveXObject -