ghc-8.2.2: The GHC API

Safe Haskell | None
Language | Haskell2010

Encoding

Contents

- UTF-8
- Z-encoding
- Base62-encoding

Synopsis

- utf8DecodeChar# :: Addr# -> (#Char#, Int##)
- utf8PrevChar :: Ptr Word8 -> IO (Ptr Word8)
- utf8CharStart :: Ptr Word8 -> IO (Ptr Word8)
- utf8DecodeChar :: Ptr Word8 -> (Char, Int)
- utf8DecodeByteString :: ByteString -> [Char]
- utf8DecodeStringLazy :: ForeignPtr Word8 -> Int -> Int -> [Char]
- utf8EncodeChar :: Char -> Ptr Word8 -> IO (Ptr Word8)
- utf8EncodeString :: Ptr Word8 -> String -> IO ()
- utf8EncodedLength :: String -> Int
- countUTF8Chars :: Ptr Word8 -> Int -> IO Int
- zEncodeString :: UserString -> EncodedString
- zDecodeString :: EncodedString -> UserString
- toBase62 :: Word64 -> String
- toBase62Padded :: Word64 -> String

# UTF-8

utf8DecodeChar# :: Addr# -> (#Char#, Int##) #

utf8PrevChar :: Ptr Word8 -> IO (Ptr Word8) #

utf8CharStart :: Ptr Word8 -> IO (Ptr Word8) #

utf8DecodeChar :: Ptr Word8 -> (Char, Int) #

utf8DecodeByteString :: ByteString -> [Char] #

utf8DecodeStringLazy :: ForeignPtr Word8 -> Int -> Int -> [Char] #

utf8EncodeChar :: Char -> Ptr Word8 -> IO (Ptr Word8) #

utf8EncodeString :: Ptr Word8 -> String -> IO () #

utf8EncodedLength :: String -> Int #

countUTF8Chars :: Ptr Word8 -> Int -> IO Int #

# Z-encoding

zEncodeString :: UserString -> EncodedString #

zDecodeString :: EncodedString -> UserString #

# Base62-encoding

toBase62 :: Word64 -> String #

toBase62Padded :: Word64 -> String #

Converts a 64-bit word into a base-62 string