human_sort

Function sort

Source
pub fn sort(arr: &mut [&str])
Expand description

Sorts &str in human-friendly order

ยงExample

use human_sort::sort;

let mut arr = ["file10.txt", "file2.txt", "file1.txt"];
sort(&mut arr);

assert_eq!(arr, ["file1.txt", "file2.txt", "file10.txt"]);