fmt-cmp
A Rust library for lexicographically comparing values in their Display
representations.
The utilities provided by this library gives the same results as comparing
values after applying to_string(), but they never allocate on the heap memory.
Examples
Compare digits of numbers:
assert!; // `"NaN" == "NaN"`
assert!; // `"42" > "240"`
Sorting integers lexicographically:
use BTreeSet;
use Cmp as FmtCmp;
let mut values: = .map.collect;
assert!;
License
Copyright (c) 2021 Daiki "tesaguri" Mizukami
This project is licensed under either of:
- The Apache License, Version 2.0 (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0), or
- The MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.