pub fn natural(a: &str, b: &str) -> OrderingExpand description
Compares two strings using natural sort order. Natural sort order compares numbers in a way humans expect, so “swp10” comes after “swp2” instead of “swp10” being less than “swp2” as in ASCII sorting.
§Arguments
a: The first string to compare.b: The second string to compare.
§Returns
An Ordering indicating the result of the comparison.