There is a function like simplified but not trim start whitespaces?
There is a function like simplified but not trim start whitespaces?
Nothin that i am aware off but you can always try something.
Like just use the simplified function over the substring that doesn't contain the start-whitespaces. ( you can find several ways to get that substring )
Good Luck.
Qt Code:
rx.match(string);To copy to clipboard, switch view to plain text mode
That will give you the first "word" and any leading whitespace, but not subsequent words with whitespace runs collapsed to single spaces as simplified() does (if you use QRegularExpression::match() or QRegExp::indexIn()).
True. However it should work if you allow multiples of such groups. Other than that a simple for loop iterating from the end of the string and chopping off whitespaces is a good approach.
Bookmarks