Thanks all.

I think appending a bunch of strings is a pretty common operation. 

Is there any reason that str is limited to 2 arguments?  It would be 
nice to do (str "foo" "bar" "baz") --> "foobarbaz".

Is there a good reason that + can't do the right thing as with other 
Java and scripting languages?  I think this would be popular with 
non-LISPers.

P



Laurent PETIT wrote:
> (str "foo" "bah")
>
> and if you have a collection you can (apply str coll)
>
> HTH,
>
> -- 
> Laurent
>
> 2009/2/26 Peter Wolf <opus...@gmail.com <mailto:opus...@gmail.com>>
>
>
>     Hey all,
>
>     What is the idiomatic way to concatenate strings?  Here are some
>     things
>     that I expected to work, but didn't
>
>        (+ "foo" "bah")
>        (conj "foo" "bah")
>        (into "foo" "bah")
>
>     For the moment I am doing
>
>        (.concat "foo" "bah")
>
>     But it seems wrong
>
>     Thanks
>     P
>
>
>
>
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to