in reply to sorting number
The relevant parts are:
* <=> does NUMERIC comparison.
* cmp does text/string comparison
You also need to extract the numeric part from the string when you want a numeric sort.
Regular expressions are useful for that.
"It's ten o'clock... Do you know where your AI programs are?"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: sorting number
by dideod.yang (Sexton) on Apr 09, 2019 at 05:34 UTC |