-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Unicode -- -- Lightweight UTF8 handling. @package utf8-light @version 0.4 -- | Lightweight UTF8 handling. module Codec.Binary.UTF8.Light -- | Instances: ByteString, String , [Word32], -- [Word] , [Int32], [Int] class UTF8 a encode :: UTF8 a => a -> ByteString decode :: UTF8 a => ByteString -> a -- | Length in Word8s lenUTF8 :: Word8 -> Int -- | Length in Word16s lenUTF16 :: Word16 -> Int -- | Lengths in Word8s countUTF8 :: ByteString -> [Int] decodeUTF8 :: ByteString -> [Word32] encodeUTF8 :: [Word32] -> ByteString -- | Word32s not representing valid UTF8 chars are dropped. encodeUTF8' :: [Word32] -> [[Word8]] withUTF8 :: UTF8 a => a -> (ByteString -> b) -> b putUTF8 :: UTF8 a => a -> IO () putUTF8Ln :: UTF8 a => a -> IO () hPutUTF8 :: UTF8 a => Handle -> a -> IO () hPutUTF8Ln :: UTF8 a => Handle -> a -> IO () readUTF8File :: UTF8 a => FilePath -> IO a writeUTF8File :: UTF8 a => FilePath -> a -> IO () appendUTF8File :: UTF8 a => FilePath -> a -> IO () hGetUTF8Line :: UTF8 a => Handle -> IO a hGetUTF8Contents :: UTF8 a => Handle -> IO a -- | Be careful that you're sure you're not chopping a UTF8 char in two! hGetUTF8 :: UTF8 a => Handle -> Int -> IO a -- | Same warning as for hGetUTF8 hGetUTF8NonBlocking :: UTF8 a => Handle -> Int -> IO a c2w :: Char -> Word32 w2c :: Word32 -> Char i2w :: Int -> Word32 w2i :: Word32 -> Int -- |
--   ghci> putUTF8Ln $ flipUTF8 "[?np_bs!]"
--   [sqbu]
--   
flipUTF8 :: UTF8 a => a -> a -- |
--   ghci> putUTF8Ln $ (unflipUTF8 . flipUTF8) "[?np_bs!]"
--   [?np_bs!]
--   
unflipUTF8 :: UTF8 a => a -> a flipTab :: [(Int, Int)] unflipTab :: [(Int, Int)] showHex :: Int -> String toBits :: Word8 -> [Word8] fromBits :: [Word8] -> Word8 -- | 8-bit signed integer type data Int8 :: * -- | 16-bit signed integer type data Int16 :: * -- | 32-bit signed integer type data Int32 :: * -- | A Word is an unsigned integral type, with the same size as -- Int. data Word :: * -- | 8-bit unsigned integer type data Word8 :: * -- | 16-bit unsigned integer type data Word16 :: * -- | 32-bit unsigned integer type data Word32 :: * instance UTF8 String instance UTF8 [Int] instance UTF8 [Int32] instance UTF8 [Word] instance UTF8 [Word32] instance UTF8 ByteString