Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What to use instead of str-utils functions?

In http://clojure.github.com/clojure-contrib/str-utils-api.html it is written that

String utilities for Clojure
Deprecated since clojure-contrib version 1.2

but it is not written what should I use instead. There are convenient functions like "chomp" or "re-partition" there.

What should I do to port old clojure v1.1 code to the recent version? Should I just copy functions from clojure-contrib directly to the source code?

like image 877
Vi. Avatar asked Nov 03 '22 18:11

Vi.


2 Answers

Some of the functionality is in the clojure.string namespace. E.g., chomp exists as trim-newline, str-join is join.

like image 120
Alex Taggart Avatar answered Nov 15 '22 06:11

Alex Taggart


You can use clojure.contrib.string instead of str-utils contrib

(use 'clojure.contrib.string)
like image 21
Ankur Avatar answered Nov 15 '22 07:11

Ankur