• (drop n s)
Drops first n characters from s. Returns an empty string if n is
greater than the length of s.

1 Example top

  • user=> (drop 1 [1 2 3 4])
    (2 3 4)
    user=> (drop 2 [1 2 3 4])
    (3 4)
    
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:117 top

(defn ^String drop
  "Drops first n characters from s.  Returns an empty string if n is
  greater than the length of s."
  [n ^String s]
  (if (< (count s) n)
    ""
    (.substring s n)))
Vars in clojure.contrib.string/drop: < count defn drop
Used in 0 other vars

Comments top

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