[Haskell-cafe] How to split this string.

max mk at mtw.ru
Mon Jan 2 10:44:23 CET 2012


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?



More information about the Haskell-Cafe mailing list