Re: A few String functions we could implement in Clojure?

2014-08-01 Thread Bozhidar Batsov
I recently raised a similar point regarding `starts-with?` and `ends-with?` (link - http://dev.clojure.org/jira/browse/CLJ-1449) and it seems that Clojure's team acknowledges that this is valid reasoning. I think you should open a ticket as well as the case you present is pretty much the same.

Re: A few String functions we could implement in Clojure?

2014-08-01 Thread mascip
I have voted your issue up, and added a comment. Thanks for the link :-) -- Pierre Masci On 1 August 2014 11:16, Bozhidar Batsov bozhidar.bat...@gmail.com wrote: I recently raised a similar point regarding `starts-with?` and `ends-with?` (link - http://dev.clojure.org/jira/browse/CLJ-1449)

Re: A few String functions we could implement in Clojure?

2014-08-01 Thread Paul Butcher
I recently hit exactly this question in a ClojureScript app I’m writing. It just so happens that Javascript provides a .indexOf method which is, as near as dammit, the same as the one provided by Java. So in this instance, portability isn’t an issue. But having said that, I would still prefer

A few String functions we could implement in Clojure?

2014-07-19 Thread Pierre Masci
Hi all, just nit picking about Clojure's String API. I've been comparing it with Java's http://www.tutorialspoint.com/java/java_strings.htm, and I noticed that (not surprisingly) they are very similar. There are just 2-3 functions that exist in Java but don't have an equivalent in Clojure. I

Re: A few String functions we could implement in Clojure?

2014-07-19 Thread Andy Fingerhut
Pierre: I maintain the cheatsheet, and I put .indexOf and .lastIndexOf on there since they are probably the most common thing I saw asked about that is in the Java API but not the Clojure API, for strings. There are also links to whole Java classes and their entire API, e.g. for file I/O, for

Re: A few String functions we could implement in Clojure?

2014-07-19 Thread Bruce Durling
Andy, How much of this reasoning do you think changes when we starting thinking about being hosted on multiple platforms (I'm thinking specifically clojure/clojurescript and cljx)? cheers, Bruce On Sat, Jul 19, 2014 at 4:17 PM, Andy Fingerhut andy.finger...@gmail.com wrote: Pierre: I

Re: A few String functions we could implement in Clojure?

2014-07-19 Thread Andy Fingerhut
I would have to defer that question to someone who makes decisions regarding what goes into Clojure/ClojureScript, and what does not. Of course, anyone else is free to create libraries that try to make portability between those two platforms easier. Perhaps someone has already taken a go at

Re: A few String functions we could implement in Clojure?

2014-07-19 Thread mascip
Thank you for your insight Andy :-) Interesting question Bruce. -- Pierre Masci On 19 July 2014 16:49, Andy Fingerhut andy.finger...@gmail.com wrote: I would have to defer that question to someone who makes decisions regarding what goes into Clojure/ClojureScript, and what does not. Of