2 releases

0.1.1 Mar 13, 2024
0.1.0 Jul 8, 2022

#412 in Text processing

Download history 81/week @ 2024-01-06 97/week @ 2024-01-13 71/week @ 2024-01-20 55/week @ 2024-01-27 91/week @ 2024-02-03 52/week @ 2024-02-10 130/week @ 2024-02-17 161/week @ 2024-02-24 140/week @ 2024-03-02 261/week @ 2024-03-09 120/week @ 2024-03-16 72/week @ 2024-03-23 129/week @ 2024-03-30 245/week @ 2024-04-06 137/week @ 2024-04-13 161/week @ 2024-04-20

678 downloads per month

MIT/Apache

16KB
205 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