Copyright | Copyright (C) 2010-2017 John MacFarlane |
---|---|
License | GNU GPL, version 2 or above |
Maintainer | John MacFarlane <jgm@berkeley.edu> |
Stability | alpha |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell98 |
UTF-8 aware string IO functions that will work with GHC 6.10, 6.12, or 7.
- readFile :: FilePath -> IO String
- getContents :: IO String
- writeFileWith :: Newline -> FilePath -> String -> IO ()
- writeFile :: FilePath -> String -> IO ()
- putStrWith :: Newline -> String -> IO ()
- putStr :: String -> IO ()
- putStrLnWith :: Newline -> String -> IO ()
- putStrLn :: String -> IO ()
- hPutStrWith :: Newline -> Handle -> String -> IO ()
- hPutStr :: Handle -> String -> IO ()
- hPutStrLnWith :: Newline -> Handle -> String -> IO ()
- hPutStrLn :: Handle -> String -> IO ()
- hGetContents :: Handle -> IO String
- toString :: ByteString -> String
- toText :: ByteString -> Text
- fromString :: String -> ByteString
- fromText :: Text -> ByteString
- toStringLazy :: ByteString -> String
- fromTextLazy :: Text -> ByteString
- toTextLazy :: ByteString -> Text
- fromStringLazy :: String -> ByteString
- encodePath :: FilePath -> FilePath
- decodeArg :: String -> String
Documentation
getContents :: IO String Source #
toString :: ByteString -> String Source #
Convert UTF8-encoded ByteString to String, also removing '\r' characters.
toText :: ByteString -> Text Source #
Convert UTF8-encoded ByteString to Text, also removing '\r' characters.
fromString :: String -> ByteString Source #
fromText :: Text -> ByteString Source #
toStringLazy :: ByteString -> String Source #
Convert UTF8-encoded ByteString to String, also removing '\r' characters.
fromTextLazy :: Text -> ByteString Source #
toTextLazy :: ByteString -> Text Source #
Convert UTF8-encoded ByteString to Text, also removing '\r' characters.
fromStringLazy :: String -> ByteString Source #
encodePath :: FilePath -> FilePath Source #