4 releases

0.1.3 Nov 7, 2024
0.1.2 Nov 4, 2024
0.1.1 Mar 13, 2024
0.1.0 Jul 8, 2022

#294 in Text processing

Download history 1071/week @ 2024-07-30 2443/week @ 2024-08-06 1114/week @ 2024-08-13 1195/week @ 2024-08-20 1239/week @ 2024-08-27 950/week @ 2024-09-03 842/week @ 2024-09-10 880/week @ 2024-09-17 1094/week @ 2024-09-24 785/week @ 2024-10-01 812/week @ 2024-10-08 785/week @ 2024-10-15 727/week @ 2024-10-22 810/week @ 2024-10-29 1490/week @ 2024-11-05 781/week @ 2024-11-12

3,995 downloads per month
Used in toster

MIT/Apache

23KB
302 lines

numeric-sort

A zero-allocation, human-readable sorting library.

This library provides convenient ways to compare or sort strings and keep numeric components in proper numerical order. For instance "test-7" will come before "test-10", contrary to traditional lexicographic comparison of characters.

The primary functions of interest are [cmp], sort, and sort_unstable.

no-std

numeric-sort is compatible with no-std projects out of the box.

However, by default we link to alloc in order to support sort (stable sorts require allocations). To prevent this, you can disable the default alloc feature, which will disable sort but leave all other functions still available.

[dependencies]
numeric-sort = { version = "...", default-features = false }

No runtime deps

Features