naturalcomp-0.0.3: Natural-order string comparison
Copyright2013 Hironao Komatsu
LicenseBSD
MaintainerHironao Komatsu <hirkmt@gmail.com>
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell98

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 -> Ordering Source #

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

naturalCaseComp :: Stringy s => s -> s -> Ordering Source #

natural order and case-insensitive string comparison

naturalCompBy :: Stringy s => (Char -> Char -> Ordering) -> s -> s -> Ordering Source #

natural order string comparison, with user-specified function