this seems to do what you want: (clojure.string/join ", " (map pr-str my-strings))
On Tue, Jul 16, 2013 at 10:17 AM, Cedric Greevey <[email protected]> wrote: > (apply str "\"" (interpose "\", \"" my-strings) "\"") might work... > > > On Tue, Jul 16, 2013 at 9:53 AM, <[email protected]> wrote: > >> Hi All, >> >> I'm new to Clojure - >> >> I'm defining a vector containing string values. The requirement for me is >> to retrieve the String values separated by comma from the input vector. >> >> Example: >> >> => (def my-strings ["one" "two" "three"]) >> >> ;; My expected output should be ;; *"one", "two", "three"* >> >> I tried interpose and join as below >> >> => (apply str (interpose "," my-strings)) >> >> => (clojure.string/join "," my-strings) >> >> both returning as "one,two,three" but I need each string surrounded by >> double quotes "" like in my example example. >> >> /Sunil. >> >> >> >> >> >> -- >> -- >> 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 >> --- >> You received this message because you are subscribed to the Google Groups >> "Clojure" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- > -- > 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 > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
