[Haskell-cafe] cutting long strings into lines
mailing_list at istitutocolli.org
Sat Sep 30 13:23:27 EDT 2006
On Sat, Sep 30, 2006 at 08:56:24PM +0400, Bulat Ziganshin wrote:
> i think that your algorithm is too complex. standard algorithm, imho,
> is to find last space before 80 (or 75) chars margin, split here and
> then repeat this procedure again. so, one line split may look like
> splitAt . last . filter (<80) . findIndices (==' ')
Thank you very much for your analysis. I find it extremely helpful.
> btw, are you seen http://haskell.org/haskellwiki/Simple_unix_tools ?
I did not! But I'm studying this page right now. Thanks for mentioning it.
Once again, thank you!
More information about the Haskell-Cafe