One small additional facet: because the (packed) index is appended to the key, this will gave you a stable sort even if the underlying sort is unstable.
See sort for more details about what that means, and when it might be relevant.
Hugo
In reply to Re: [ Natural Sort ]: Sorting a string with numbers
by hv
in thread [ Natural Sort ]: Sorting a string with numbers
by zzspectrez
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |