aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/clojure/clojure/contrib/command_line.clj8
-rw-r--r--src/main/clojure/clojure/contrib/repl_utils.clj8
-rw-r--r--src/main/clojure/clojure/contrib/string.clj2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/main/clojure/clojure/contrib/command_line.clj b/src/main/clojure/clojure/contrib/command_line.clj
index 02995ddd..b93e251b 100644
--- a/src/main/clojure/clojure/contrib/command_line.clj
+++ b/src/main/clojure/clojure/contrib/command_line.clj
@@ -13,7 +13,7 @@
:doc "Process command-line arguments according to a given cmdspec"}
clojure.contrib.command-line
(:require (clojure.contrib [seq :as su]))
- (:use (clojure.contrib [string :only (str-join)])))
+ (:use (clojure.contrib [string :only (join)])))
(defn make-map [args cmdspec]
(let [{spec true [rest-sym] false} (su/group-by vector? cmdspec)
@@ -49,13 +49,13 @@
[spec & rows]
(let [maxes (vec (for [n (range (count (first rows)))]
(apply max (map (comp count #(nth % n)) rows))))
- fmt (str-join " "
+ fmt (join " "
(for [n (range (count maxes))]
(str "%"
(when-not (zero? (maxes n))
(str (when (= (spec n) :l) "-") (maxes n)))
"s")))]
- (str-join "\n"
+ (join "\n"
(for [row rows]
(apply format fmt row)))))
@@ -77,7 +77,7 @@
(str (first argnames)))
argnames (map (comp rmv-q str) argnames)
argnames
- (str-join ", "
+ (join ", "
(for [arg argnames]
(if (= 1 (count arg))
(str "-" arg)
diff --git a/src/main/clojure/clojure/contrib/repl_utils.clj b/src/main/clojure/clojure/contrib/repl_utils.clj
index 2c1a5fa2..309e1bac 100644
--- a/src/main/clojure/clojure/contrib/repl_utils.clj
+++ b/src/main/clojure/clojure/contrib/repl_utils.clj
@@ -17,21 +17,21 @@
(clojure.lang RT Compiler Compiler$C))
(:use [clojure.contrib.seq :only (indexed)]
[clojure.contrib.javadoc.browse :only (browse-url)]
- [clojure.contrib.string :only (str-join re-sub re-partition)]))
+ [clojure.contrib.string :as s :only ()]))
;; ----------------------------------------------------------------------
;; Examine Java classes
(defn- sortable [t]
(apply str (map (fn [[a b]] (str a (format "%04d" (Integer. b))))
- (partition 2 (concat (re-partition #"\d+" t) [0])))))
+ (partition 2 (concat (s/partition #"\d+" t) [0])))))
(defn- param-str [m]
- (str " (" (str-join
+ (str " (" (s/join
"," (map (fn [[c i]]
(if (> i 3)
(str (.getSimpleName c) "*" i)
- (str-join "," (replicate i (.getSimpleName c)))))
+ (s/join "," (replicate i (.getSimpleName c)))))
(reduce (fn [pairs y] (let [[x i] (peek pairs)]
(if (= x y)
(conj (pop pairs) [y (inc i)])
diff --git a/src/main/clojure/clojure/contrib/string.clj b/src/main/clojure/clojure/contrib/string.clj
index 7fa871ea..094e0441 100644
--- a/src/main/clojure/clojure/contrib/string.clj
+++ b/src/main/clojure/clojure/contrib/string.clj
@@ -201,7 +201,7 @@
before the first match, or an empty string if the beginning of the
string matches.
- For example: (partition \"abc123def\" #\"[a-z]+\")
+ For example: (partition #\"[a-z]+\" \"abc123def\")
returns: (\"\" \"abc\" \"123\" \"def\")"
[#^Pattern re #^String s]
(let [m (re-matcher re s)]