
30 Oct
2009
30 Oct
'09
1:47 p.m.
On Fri, Oct 30, 2009 at 01:40:13PM +0000, Luca Ciciriello wrote:
Hi all.
Just a very basic question.
I need to write a function str2lsts :: String -> [[String]] in order to transorm a string like:
"\"1\",\"cat\",\"dog\"ยง\"2\",\"duck\",\"goose\""
in the list of lists:
[["1","cat","dog"],["2","duck","goose"]]
Another possibility: import Data.List.Split -- from the 'split' package on Hackage str2lsts = map (splitOn ",") . splitOn "@" . filter (/='"') -Brent