This seems like quite a specialised function to have in a core string library.
To me, the only behaviour that would be generic enough to include in a core library would be to capitalise all the letters of the string. On 12 December 2012 17:12, Pierre Allix <pierre.allix.w...@gmail.com> wrote: > Hello, > > The clojure.string/capitalize function is defined as follow: > > Converts first character of the string to upper-case, all other > > characters to lower-case. > > > I think it does not follow principle of least astonishment. I would have > expected to convert only the first character. Moreover converting the other > characters make the function almost useless, I for instance had this string > to capitalize: > > "if P is true then do W" which is converted into "If p is true then do w". > This is not helpful. > > > Is there a good reason to convert the other characters? Shouldn't this be > done explicitly by the user? Would it make sense to change the capitalize > function in the next versions? > > > -- > 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 > Note that posts from new members are moderated - please be patient with > your first post. > 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 -- 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 Note that posts from new members are moderated - please be patient with your first post. 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