clojure.contrib.str-utils/re-partition is what you are looking for;
(re-partition #"\w+" " a word and another word1 ")
-> (" " "a" " " "word" " " "and" " " "another" " " "word1" " ")
On Aug 11, 12:57 pm, ogcraft <[email protected]> wrote:
> How can I split a string, but not to drop witespaces.
> Like this:
>
> " a word and another word1 " --> (" ", "a", " ", "word", " ",
> "and", " ", "another", " ", "word1", " ").
>
> Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
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
-~----------~----~----~----~------~----~------~--~---