Maintainer | Bas van Dijk <v.dijk.bas@gmail.com> |
---|---|
Safe Haskell | Trustworthy |
This module is intended to be imported qualified. May I suggest:
import Data.CaseInsensitive ( CI ) import qualified Data.CaseInsensitive as CI
Documentation
A CI s
provides Case Insensitive comparison for the string-like type
s
(for example: String
, Text
, ByteString
, ShowS
, etc.).
Note that CI s
has an instance for IsString
which together with the
OverloadedStrings
language extension allows you to write case insensitive
string literals as in:
> ("Content-Type" ::CI
Text
) == ("CONTENT-TYPE" ::CI
Text
) True
foldedCase :: CI s -> sSource
Retrieve the case folded string-like value.
(Also see foldCase
).
map :: FoldCase s2 => (s1 -> s2) -> CI s1 -> CI s2Source
Transform the original string-like value but keep it case insensitive.
Class of string-like types that support folding cases.
Note: In some languages, case conversion is a locale- and context-dependent
operation. The foldCase
method is not intended to be locale sensitive.
Programs that require locale sensitivity should use appropriate versions of
the case mapping functions from the text-icu
package:
http://hackage.haskell.org/package/text-icu
FoldCase String | |
FoldCase ShowS | |
FoldCase ByteString | Note that |
FoldCase ByteString | Note that |
FoldCase Text | |
FoldCase Text | |
FoldCase (CI s) |