Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- module Control.Category.Printf
- printf :: Format ByteString (IO ()) b -> b
- printfLn :: Format ByteString (IO ()) b -> b
- hPrintf :: Handle -> Format ByteString (IO ()) b -> b
- hPrintfLn :: Handle -> Format ByteString (IO ()) b -> b
- padLeft :: ByteString -> Int -> Format ByteString a b -> Format ByteString a b
- padRight :: ByteString -> Int -> Format ByteString a b -> Format ByteString a b
Documentation
module Control.Category.Printf
printf :: Format ByteString (IO ()) b -> b Source
printfLn :: Format ByteString (IO ()) b -> b Source
padLeft :: ByteString -> Int -> Format ByteString a b -> Format ByteString a b Source
padLeft s n f will transform the formatter f, ensuring that the output produced is at least length n by appending sufficiently many copies of s on the left. The string s should have length at least 1, otherwise this has no effect. In cases where s has length greater than 1, the last occurrence of s will be truncated as necessary to fit the necessary width.
padRight :: ByteString -> Int -> Format ByteString a b -> Format ByteString a b Source
padRight s n f will transform the formatter f, ensuring that the output produced is at least length n by appending sufficiently many copies of s on the right. The string s should have length at least 1, otherwise this has no effect. In cases where s has length greater than 1, the last occurrence of s will be truncated as necessary to fit the necessary width.