File: String.hs

package info (click to toggle)
haskell-foundation 0.0.30-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 928 kB
  • sloc: haskell: 9,124; ansic: 570; makefile: 6
file content (43 lines) | stat: -rw-r--r-- 1,058 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
-- |
-- Module      : Foundation.String
-- License     : BSD-style
-- Maintainer  : Vincent Hanquez <vincent@snarc.org>
-- Stability   : experimental
-- Portability : portable
--
-- 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" :: String
--
-- > s = fromList ("Hello World" :: Prelude.String) :: String
--
-- Each 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>
--
module Foundation.String
    ( String
    , Encoding(..)
    , fromBytes
    , fromBytesLenient
    , fromBytesUnsafe
    , toBytes
    , ValidationFailure(..)
    , lines
    , words
    , upper
    , lower
    , replace
    , indices
    , toBase64
    , toBase64URL
    , toBase64OpenBSD
    , breakLine
    ) where

import Basement.String