• (take n s)
Take first n characters from s, up to the length of s.

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:110 top

(defn ^String take
  "Take first n characters from s, up to the length of s."
  [n ^String s]
  (if (< (count s) n)
    s
    (.substring s 0 n)))
Vars in clojure.contrib.string/take: < count defn take
Used in 0 other vars

Comments top

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