Distribution.Utils.String

Cabal-syntax-3.7.0.0: A library for working with .cabal files

Safe Haskell | Safe-Inferred
Language | Haskell2010

Distribution.Utils.String

Contents

- Encode to/from UTF8

Synopsis

- decodeStringUtf8 :: [Word8] -> String
- encodeStringUtf8 :: String -> [Word8]
- trim :: String -> String

# Encode to/from UTF8

decodeStringUtf8 :: [Word8] -> String Source #

Decode `String` from UTF8-encoded octets.

Invalid data in the UTF8 stream (this includes code-points `U+D800` through `U+DFFF`) will be decoded as the replacement character (`U+FFFD`).

See also `encodeStringUtf8`

encodeStringUtf8 :: String -> [Word8] Source #

Encode `String` to a list of UTF8-encoded octets

Code-points in the `U+D800`-`U+DFFF` range will be encoded as the replacement character (i.e. `U+FFFD`).

See also `decodeUtf8`

trim :: String -> String Source #