Hi, I was wondering if there's a drop function somewhere in contrib
that work for strings. I didn't found any so I wrote my own:

(defn drop-str
  ([s] (drop-str 1 s))
  ([n s] (apply str (drop n (seq s)))))

This is not really fast, a better version would be something like
that:

(defn drop-str [n #^String s]
  (let [l (.length s)]
    (.substring s (if (> n l) l n))))

Any suggestions?

- budu

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to