natcmp 1.2.3
Compare strings in a human-natural way.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
Natcmp - A D library for comparing strings and paths in a human-natural way.
Supported platforms
- Any with D compilers
Example usage
assert(array(sort!compareNaturalSort(["0", "10", "1"])) == ["0", "1", "10"]);
assert(array(sort!compareNaturalSort(["a", "c", "b"])) == ["a", "b", "c"]);
assert(array(sort!compareNaturalSort(["a1", "a"])) == ["a", "a1"]);
assert(array(sort!comparePathsNaturalSort(["a/b/c", "a/b/e", "a/b/d"])) == ["a/b/c", "a/b/d", "a/b/e"]);
assert(array(sort!comparePathsNaturalSort(["a1", "a"])) == ["a", "a1"]);
assert(array(sort!comparePathsNaturalSort(["a1/b", "a/b"])) == ["a/b", "a1/b"]);
- Registered by Cameron Ross
- 1.2.3 released 9 years ago
- Herringway/natcmp
- github.com/Herringway/natcmp
- BSL-1.0
- Copyright © 2014, Cameron
- Authors:
- Dependencies:
- none
- Versions:
-
1.3.3 2022-Oct-25 1.3.2 2016-Nov-05 1.3.1 2016-Feb-19 1.3.0 2016-Jan-23 1.2.3 2015-Aug-26 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
2215 downloads total
-
- Score:
- 1.0
- Short URL:
- natcmp.dub.pm