Data.CIByteString

snap-core-0.2.16: Snap: A Haskell Web Framework (Core)

Data.CIByteString

Description

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

Synopsis

- data CIByteString
- toCI :: ByteString -> CIByteString
- unCI :: CIByteString -> ByteString
- ciToLower :: CIByteString -> ByteString

# Documentation

data CIByteString

A case-insensitive newtype wrapper for `ByteString`

Instances

Eq CIByteString |
Ord CIByteString |
Show CIByteString |
IsString CIByteString |
HasHeaders Headers |

toCI :: ByteString -> CIByteString

unCI :: CIByteString -> ByteString

ciToLower :: CIByteString -> ByteString