5

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?

4

3 回答 3

2

一些功能位于clojure.string命名空间中。例如,chomp作为 存在trim-newlinestr-joinjoin

于 2012-08-09T07:24:40.677 回答
1

您可以使用clojure.contrib.string代替 str-utils contrib

(use 'clojure.contrib.string)
于 2012-08-09T04:29:05.173 回答
-1

是的,我认为 clojure/core 字符串和 re 库更适合你。

于 2012-08-09T02:15:23.973 回答