On Wed, Sep 10, 2008 at 9:07 AM, ssecorp <[EMAIL PROTECTED]> wrote:
>
> So this string-splitting function works but it doesn't look very
> aesthetic and returns a list of lists of \char.
>
> I know I can do (map str list) to turn the chars(?) into strings again
> but how do I append them?
In general you can produce a single string from a seq or stuff like
this: (apply str stuff)
But for this particular task you could use the String class's own split method:
user=> (seq (.split "asdf,wef,asdf,asg" ","))
("asdf" "wef" "asdf" "asg")
> btw, anyone know how to set default intendation to 4 chars instead of
> 2?
:set sw=4
That's for vim. You are using vim, aren't you? :-)
--Chouser
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---