1.2.0 permalink Arrow_down_16x16
  • (capitalize s)
Converts first character of the string to upper-case, all other
characters to lower-case.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/string.clj:271 top

(defn ^String capitalize
  "Converts first character of the string to upper-case, all other
  characters to lower-case."
  {:deprecated "1.2"}
  [^String s]
  (if (< (count s) 2)
    (.toUpperCase s)
    (str (.toUpperCase ^String (subs s 0 1))
         (.toLowerCase ^String (subs s 1)))))
Vars in clojure.contrib.string/capitalize: < count defn str subs
Used in 0 other vars

Comments top

No comments for capitalize. Log in to add a comment.