naturalcomp-0.0.3: Natural-order string comparison

Portabilityportable
MaintainerHironao Komatsu <hirkmt@gmail.com>
Safe HaskellNone

Text.NaturalComp

Description

Natural order string comparison is needed when e.g. one wants to compare file names or strings of software version. It's aimed to be compatible to glibc's strverscmp() function.

Synopsis

Documentation

naturalComp :: Stringy s => s -> s -> OrderingSource

natural order string comparison, compatible to glibc's strverscmp()

naturalCaseComp :: Stringy s => s -> s -> OrderingSource

natural order and case-insensitive string comparison

naturalCompBy :: Stringy s => (Char -> Char -> Ordering) -> s -> s -> OrderingSource

natural order string comparison, with user-specified function