| Copyright | 2013 Hironao Komatsu |
|---|---|
| License | BSD |
| Maintainer | Hironao Komatsu <hirkmt@gmail.com> |
| Portability | portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell98 |
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
- naturalComp :: Stringy s => s -> s -> Ordering
- naturalCaseComp :: Stringy s => s -> s -> Ordering
- naturalCompBy :: Stringy s => (Char -> Char -> Ordering) -> s -> s -> Ordering
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