Namespaces

 
0.2.0-SNAPSHOT Arrow_down_16x16

capitalize

clj-ssh.ssh

  • (capitalize s)
Converts first character of the string to upper-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 clj_ssh/ssh.clj:216 top

(defn #^String capitalize
  "Converts first character of the string to upper-case."
  [#^String s]
  (if (< (count s) 2)
    (.toUpperCase s)
    (str (.toUpperCase #^String (subs s 0 1))
         (subs s 1))))
Vars in clj-ssh.ssh/capitalize: < count defn str subs
Used in 0 other vars

Comments top

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