| License | BSD-style |
|---|---|
| Maintainer | Vincent Hanquez <vincent@snarc.org> |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Foundation.String
Description
Opaque packed String encoded in UTF8.
The type is an instance of IsString and IsList, which allow OverloadedStrings
for string literal, and fromList to convert a [Char] (Prelude String) to a packed
representation
{-# LANGUAGE OverloadedStrings #-}
s = "Hello World" :: Strings = fromList ("Hello World" :: Prelude.String) :: StringEach unicode code point is represented by a variable encoding of 1 to 4 bytes,
For more information about UTF8: https://en.wikipedia.org/wiki/UTF-8
Documentation
Instances
Constructors
| ASCII7 | |
| UTF8 | |
| UTF16 | |
| UTF32 | |
| ISO_8859_1 |
Instances
| Data Encoding | |
Defined in Basement.String Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Encoding -> c Encoding Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Encoding Source # toConstr :: Encoding -> Constr Source # dataTypeOf :: Encoding -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Encoding) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Encoding) Source # gmapT :: (forall b. Data b => b -> b) -> Encoding -> Encoding Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Encoding -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Encoding -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Encoding -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Encoding -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Encoding -> m Encoding Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Encoding -> m Encoding Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Encoding -> m Encoding Source # | |
| Bounded Encoding | |
| Enum Encoding | |
Defined in Basement.String Methods succ :: Encoding -> Encoding Source # pred :: Encoding -> Encoding Source # toEnum :: Int -> Encoding Source # fromEnum :: Encoding -> Int Source # enumFrom :: Encoding -> [Encoding] Source # enumFromThen :: Encoding -> Encoding -> [Encoding] Source # enumFromTo :: Encoding -> Encoding -> [Encoding] Source # enumFromThenTo :: Encoding -> Encoding -> Encoding -> [Encoding] Source # | |
| Show Encoding | |
| Eq Encoding | |
| Ord Encoding | |
Defined in Basement.String | |
fromBytesUnsafe :: UArray Word8 -> String #
data ValidationFailure #
Constructors
| InvalidHeader | |
| InvalidContinuation | |
| MissingByte | |
| BuildingFailure |
Instances
| Exception ValidationFailure | |
Defined in Basement.UTF8.Types | |
| Show ValidationFailure | |
Defined in Basement.UTF8.Types | |
| Eq ValidationFailure | |
Defined in Basement.UTF8.Types Methods (==) :: ValidationFailure -> ValidationFailure -> Bool Source # (/=) :: ValidationFailure -> ValidationFailure -> Bool Source # | |
toBase64URL :: Bool -> String -> String #
toBase64OpenBSD :: String -> String #