Re: clojure.string/replace-first return nil when not matched

2011-03-20 Thread Takahiro Hozumi
Hi, Please bump up my JIRA membership level to make edits and I will fix this bug. I have an account named Takahiro Hozumi on dev.clojure.org already. CA is also already sent. Thanks. On 3月11ζ—₯, 午後10:55, Stuart Sierra wrote: > > (require '[clojure.string :as str]) > > (str/replace-first "abc def"

Re: clojure.string/replace-first return nil when not matched

2011-03-11 Thread Stuart Sierra
> > (require '[clojure.string :as str]) > (str/replace-first "abc def" #"ghi" (fn [a] (str a a))) > => nil > That's a bug. Created http://dev.clojure.org/jira/browse/CLJ-753 Thanks for the report. -Stuart Sierra clojure.com -- You received this

Re: clojure.string/replace-first return nil when not matched

2011-03-10 Thread Armando Blancas
1. The Clojure wrapper put the last two calls inside the if, unlike Matcher#replaceFirst(), thus the nil. public String replaceFirst(String replacement) { if (replacement == null) throw new NullPointerException("replacement"); StringBuffer sb = new StringBuffer(); reset();