Community
Modules 2

Data.CaseInsensitive

This module is intended to be imported qualified. May I suggest:

import           Data.CaseInsensitive  ( CI )
import qualified Data.CaseInsensitive as CI

Note that the FoldCase instance for ByteStrings is only guaranteed to be correct for ISO-8859-1 encoded strings!

data CI s

A CI s provides Case Insensitive comparison for the string-like type s (for example: String, Text, ByteString, 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' 'T.Text') == (\"CONTENT-TYPE\" :: 'CI' 'T.Text')
True

mk :: FoldCase s => s -> CI s

Make the given string-like value case insensitive.

original :: CI s -> s

Retrieve the original string-like value.

foldedCase :: CI s -> s

Retrieve the case folded string-like value. (Also see foldCase).

map :: FoldCase s2 => (s1 -> s2) -> (CI s1 -> CI s2)

Transform the original string-like value but keep it case insensitive.

traverse :: (FoldCase s2, Applicative f) => (s1 -> f s2) -> CI s1 -> f (CI s2)

Transform the original string-like value but keep it case insensitive.

class FoldCase s

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

Maintainer
Bas van Dijk <v.dijk.bas@gmail.com>
Copyright
(c) 2011-2013 Bas van Dijk
License
BSD-style (see the file LICENSE)
Build record and source files

Community contribution. The service has not verified this documentation.

Target: Linux on x86-64. Some inferred types and resolved links are not available.

Generator: aihc-haddock-aa6debbd-web-3

Metadata snapshot: 97ab5ad4ba6c035a1a3aa0afec9c5038b13a6bcf3491e6913073324c08090767

Open the dependency plan · Download the documentation model

Import a package

Enter a package name and an exact version from Hackage. The site contains imported versions only.