[Haskell-cafe] Separate a string into a list of strings

Neil Mitchell ndmitchell at gmail.com
Mon Jun 12 18:55:42 EDT 2006


Hi,

I tend to use the module TextUtil (or Util.Text) from Yhc for these
kind of string manipulations:

http://www-users.cs.york.ac.uk/~malcolm/cgi-bin/darcsweb.cgi?r=yhc;a=headblob;f=/src/compiler98/Util/Text.hs

separate = splitList ","

I am currently thinking about making this module into a standalone
library with some other useful functions, if people have any opinions
on this then please let me know.

Thanks

Neil


On 6/12/06, Sara Kenedy <sarakenedy at gmail.com> wrote:
> Hi all,
>
> I want to write a function to separate a string into a list of strings
> separated by commas.
>
> Example:
> separate :: String -> [String]
>
> separate "Haskell, Haskell, and Haskell" = ["Haskell", "Haskell", "and Haskell"]
>
> If anyone has some ideas, please share with me. Thanks.
>
> S.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>


More information about the Haskell-Cafe mailing list