Details
-
Suggestion
-
Status: Closed
-
Not Evaluated
-
Resolution: Done
-
None
-
None
-
MSVC8 SP1, Windows XP SP2
Description
It would be nice to have static equivalents of functions in QChar such as isDigit(), isHighSurrogate(), isLetter(), isLetterOrNumber(), isLowSurrogate(), isLower(), isMark(), isNull(), isNumber(), isPrint(), isPunct(), isSpace(), isSymbol(), isTitleCase(), isUpper() and hasMirrored ().
I'm thinking of something like this:
static bool QChar::isDigit(const QChar c) { return c.isDigit(); }
This you could use the functions as predicates with STL algorithms like this:
std::remove_if(sep.begin(), sep.end(), QChar::isDigit);
I know it's easy to do this yourself, but it'd be nice to have in the Qt framework per default.
A function QString::erase(iterator begin(), iterator end()) would be very helpful as well, to actually erase the "removed" elements.