Data.CIByteString is a module containing CIByteString
, a wrapper for
ByteString
which provides case-insensitive (ASCII-wise) Ord
and Eq
instances.
CIByteString
also has an IsString
instance, so if you use the
"OverloadedStrings" LANGUAGE pragma you can write case-insensitive string
literals, e.g.:
> let a = "Foo" in putStrLn $ (show $ unCI a) ++ "==\"FoO\" is " ++ show (a == "FoO") "Foo"=="FoO" is True
- data CIByteString
- toCI :: ByteString -> CIByteString
- unCI :: CIByteString -> ByteString
- ciToLower :: CIByteString -> ByteString
Documentation
data CIByteString Source
A case-insensitive newtype wrapper for ByteString
toCI :: ByteString -> CIByteStringSource
unCI :: CIByteString -> ByteStringSource