natcmp

Compare strings in a human-natural way.


Keywords
library
License
BSL-1.0
Install
dub fetch natcmp --version 1.3.3

Documentation

Natcmp

Coverage Status GitHub tag

Natcmp is a library for comparing strings and paths in a way more familiar to humans.

For a list of strings like [a, 100, 10, b, 2], sorting ASCIIbetically would produce the unexpected ordering of [10, 100, 2, a, b]. A human would expect an ordering more like [2, 10, 100, a, b]. This library provides the means to sort and compare strings in such a fashion.

Documentation