26 Aug
2002
26 Aug
'02
1:41 p.m.
Dr Mark H Phillips wrote:
Hi again,
After doing some searching, it seems that "pretty printing" is a prominant "Haskell way" of doing text output. I still am interested in finding a library of standard text formatting (String formatting) functions, but it seems like it might be worth my while investigating pretty printing.
Pretty printing is not very suited for printf like formatting, left/right justifying text is easy though: -- left/right justify the string "xs" in a fieldwidth "n". leftJustify n xs = xs ++ replicate (n - length xs) ' ' rightJustify n xs = replicate (n - length xs) ' ' ++ xs Jan