Workspace 6.21.5
|
Compares two QFileInfo's "naturally". Numbers will be compared as numbers, strings compared as strings etc. More...
#include <Workspace/Application/LanguageUtils/compare.h>
Public Member Functions | |
bool | operator() (const QFileInfo &left, const QFileInfo &right) const |
This is done by generating "keys" for each string, where each key is an array containing the string split into alpha and numeric parts. For example the string: a123-35abc-15 would become [ a, 123, -, 35, abc, -, 15 ].This key can then be compared piece by piece, ensuring the strings are sorted in a natural way, rather than alphabetically (by ASCII).
bool operator() | ( | const QFileInfo & | left, |
const QFileInfo & | right | ||
) | const |
left | The left operand of the comparison. |
right | The right operand of the comparison. |