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

Note the argument order is the opposite of clojure.core/drop; this
is to keep the string as the first argument for use with ->

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/str_utils2.clj:120 top

(defn ^String drop
  "Drops first n characters from s.  Returns an empty string if n is
  greater than the length of s.

  Note the argument order is the opposite of clojure.core/drop; this
  is to keep the string as the first argument for use with ->"
  [^String s n]
  (if (< (count s) n)
    ""
    (.substring s n)))
Vars in clojure.contrib.str-utils2/drop: < count defn drop
Used in 0 other vars

Comments top

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