ghc-lib-parser-9.2.5.20221107: The GHC API, decoupled from GHC versions
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Utils.Encoding

Synopsis

UTF-8

utf8DecodeCharAddr# :: Addr# -> Int# -> (# Char#, Int# #) Source #

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

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

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

utf8DecodeByteString :: ByteString -> [Char] Source #

utf8UnconsByteString :: ByteString -> Maybe (Char, ByteString) Source #

utf8DecodeShortByteString :: ShortByteString -> [Char] Source #

utf8CompareShortByteString :: ShortByteString -> ShortByteString -> Ordering Source #

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

utf8EncodeChar :: (Int# -> Word8# -> State# s -> State# s) -> Char -> ST s Int Source #

utf8EncodeString :: String -> ByteString Source #

utf8EncodeStringPtr :: Ptr Word8 -> String -> IO () Source #

countUTF8Chars :: ShortByteString -> IO Int Source #

Z-encoding

zEncodeString :: UserString -> EncodedString Source #

zDecodeString :: EncodedString -> UserString Source #

Base62-encoding

toBase62 :: Word64 -> String Source #

toBase62Padded :: Word64 -> String Source #

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