Am 04.01.2012 17:47, schrieb Steve Horne:
On 02/01/2012 11:12, Jon Fairbairn wrote:
max<m...@mtw.ru> writes:

I want to write a function whose behavior is as follows:

foo "string1\nstring2\r\nstring3\nstring4" = ["string1",
"string2\r\nstring3", "string4"]

Note the sequence "\r\n", which is ignored. How can I do this?

Why do you have these (unhealthy) different kinds of line breaks (Unix and Windows style) in your string in the first place?

I hope, not by something calling "unlines" (or intercalate "\n") earlier.

Cheers Christian

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to