5 releases

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

#269 in Text processing

Download history 1002/week @ 2024-08-21 1214/week @ 2024-08-28 1037/week @ 2024-09-04 703/week @ 2024-09-11 929/week @ 2024-09-18 1003/week @ 2024-09-25 856/week @ 2024-10-02 789/week @ 2024-10-09 762/week @ 2024-10-16 843/week @ 2024-10-23 799/week @ 2024-10-30 1404/week @ 2024-11-06 778/week @ 2024-11-13 810/week @ 2024-11-20 934/week @ 2024-11-27 547/week @ 2024-12-04

3,196 downloads per month
Used in toster

MIT/Apache

24KB
310 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