By the way, I'm glad you added this. I frequently write (defn- string [x] (if (keyword? x) (name x) (str x))) at the top of a file, but I've never settled on a name. I've called it string, keystr, name-str, and half a dozen others.
-other Stuart On Apr 8, 8:13 pm, Stuart Halloway <stuart.hallo...@gmail.com> wrote: > Changed to as-str (r654). > > Stu > > > > > In Compojure, I called this str*, but I think I like as-str a little > > better. > > > - James > > > On Apr 5, 5:19 pm, Stuart Halloway <stuart.hallo...@gmail.com> wrote: > >> Never worry about the distinction between symbols, keywords, and > >> strings when working with Java APIs that know only strings! > > >> (doc the-str) > >> ------------------------- > >> clojure.contrib.java-utils/the-str > >> ([x]) > >> Returns the name or string representation of x > > >> Notes: > > >> (1) You will need to build contrib from source to see this. > > >> (2) This function is moved from Steve Gilardi's sql.internal contrib. > >> (Steve, I broke sql in r636 but I think I fixed it now. Are there > >> tests I can run?) > > >> (3) I believe that the-str in miglayout can also be eliminated in > >> favor of this standard version. Steve, do you agree? > > >> Questions: > > >> (1) I kept the original name "the-str" but would prefer "as-str". > >> Community, what say ye? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---