Functor for combining lexical and numeric comparisons.
More...
#include <stringutils.h>
|
static int | cmp (const StringData &s1, const StringData &s2, bool lexOnly) |
| Non numeric characters are compared lexicographically; numeric substrings are compared numerically; dots separate ordered comparable subunits. More...
|
|
Functor for combining lexical and numeric comparisons.
mongo::LexNumCmp::LexNumCmp |
( |
bool |
lexOnly | ) |
|
- Parameters
-
lexOnly | - compare all characters lexically, including digits. |
static int mongo::LexNumCmp::cmp |
( |
const StringData & |
s1, |
|
|
const StringData & |
s2, |
|
|
bool |
lexOnly |
|
) |
| |
|
static |
Non numeric characters are compared lexicographically; numeric substrings are compared numerically; dots separate ordered comparable subunits.
For convenience, character 255 is greater than anything else.
- Parameters
-
lexOnly | - compare all characters lexically, including digits. |
The documentation for this class was generated from the following file: