aboutsummaryrefslogtreecommitdiff
path: root/str-utils2-api.html
diff options
context:
space:
mode:
Diffstat (limited to 'str-utils2-api.html')
-rw-r--r--str-utils2-api.html126
1 files changed, 95 insertions, 31 deletions
diff --git a/str-utils2-api.html b/str-utils2-api.html
index f61549f3..ac3143b9 100644
--- a/str-utils2-api.html
+++ b/str-utils2-api.html
@@ -144,6 +144,8 @@ Goals:
Some ideas are borrowed from
<a href="http://github.com/francoisdevlin/devlinsf-clojure-utils/">http://github.com/francoisdevlin/devlinsf-clojure-utils/</a></pre>
+
+
<br />
<h2>Public Variables and Functions</h2>
<div id="var-entry">
@@ -154,7 +156,9 @@ Some ideas are borrowed from
<pre id="var-usage">Usage: (blank? s)
</pre>
<pre id="var-docstr">True if s is nil, empty, or contains only whitespace.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L102" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -167,7 +171,9 @@ if n is greater than the length of s.
Note the argument order is the opposite of clojure.core/butlast;
this is to keep the string as the first argument for use with -&gt;</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L128" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -177,7 +183,9 @@ this is to keep the string as the first argument for use with -&gt;</pre>
</pre>
<pre id="var-docstr">Converts first character of the string to upper-case, all other
characters to lower-case.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L285" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -187,7 +195,9 @@ characters to lower-case.</pre>
</pre>
<pre id="var-docstr">Removes all trailing newline \n or return \r characters from
string. Note: String.trim() is similar and faster.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L258" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -197,7 +207,9 @@ string. Note: String.trim() is similar and faster.</pre>
</pre>
<pre id="var-docstr">Removes the last character of string, does nothing on a zero-length
string.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L249" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -207,7 +219,9 @@ string.</pre>
</pre>
<pre id="var-docstr">Returns a sequence of integer Unicode code points in s. Handles
Unicode supplementary characters (above U+FFFF) correctly.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L77" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -216,7 +230,9 @@ Unicode supplementary characters (above U+FFFF) correctly.</pre>
<pre id="var-usage">Usage: (contains? s substring)
</pre>
<pre id="var-docstr">True if s contains the substring.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L364" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -229,7 +245,9 @@ Unicode supplementary characters (above U+FFFF) correctly.</pre>
Repeatedly executes body, with name bound to each character in
string. Does NOT handle Unicode supplementary characters (above
U+FFFF).</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L37" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -242,7 +260,9 @@ U+FFFF).</pre>
Repeatedly executes body, with name bound to the integer code point
of each Unicode character in the string. Handles Unicode
supplementary characters (above U+FFFF) correctly.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L53" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -255,7 +275,9 @@ greater than the length of s.
Note the argument order is the opposite of clojure.core/drop; this
is to keep the string as the first argument for use with -&gt;</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L117" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -266,7 +288,9 @@ is to keep the string as the first argument for use with -&gt;</pre>
<pre id="var-docstr">Returns a new String by applying cmap (a function or a map) to each
character in s. If cmap returns nil, the original character is
added to the output unchanged.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L90" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -275,7 +299,9 @@ added to the output unchanged.</pre>
<pre id="var-usage">Usage: (get s i)
</pre>
<pre id="var-docstr">Gets the i'th character in string.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L369" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -285,7 +311,9 @@ added to the output unchanged.</pre>
</pre>
<pre id="var-docstr">Filters elements of coll by a regular expression. The String
representation (with str) of each element is tested with re-find.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L317" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -295,7 +323,9 @@ representation (with str) of each element is tested with re-find.</pre>
</pre>
<pre id="var-docstr">Returns a string of all elements in coll, separated by
separator. Like Perl's join.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L243" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -304,7 +334,9 @@ separator. Like Perl's join.</pre>
<pre id="var-usage">Usage: (lower-case s)
</pre>
<pre id="var-docstr">Converts string to all lower-case.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L348" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -313,7 +345,9 @@ separator. Like Perl's join.</pre>
<pre id="var-usage">Usage: (ltrim s)
</pre>
<pre id="var-docstr">Removes whitespace from the left side of string.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L294" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -323,7 +357,9 @@ separator. Like Perl's join.</pre>
</pre>
<pre id="var-docstr">Apply f to each element of coll, concatenate all results into a
String.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L310" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -340,7 +376,9 @@ first argument to f.
Example: (str-utils2/partial str-utils2/take 2)
;;=&gt; (fn [s] (str-utils2/take s 2))</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L323" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -356,7 +394,9 @@ string matches.
For example: (partition "abc123def" #"[a-z]+")
returns: ("" "abc" "123" "def")</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L222" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -365,7 +405,9 @@ returns: ("" "abc" "123" "def")</pre>
<pre id="var-usage">Usage: (repeat s n)
</pre>
<pre id="var-docstr">Returns a new String containing s repeated n times.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L146" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -383,7 +425,9 @@ Allowed argument types for pattern and replacement are:
4. regex Pattern and function
(Calls function with re-groups of each match, uses return
value as replacement.)</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L156" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -398,7 +442,9 @@ Allowed argument types for pattern and replacement are:
2. regex Pattern and String
(Uses java.util.regex.Matcher.replaceAll)
3. regex Pattern and function</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L192" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -407,7 +453,9 @@ Allowed argument types for pattern and replacement are:
<pre id="var-usage">Usage: (reverse s)
</pre>
<pre id="var-docstr">Returns s with its characters reversed.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L151" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -416,7 +464,9 @@ Allowed argument types for pattern and replacement are:
<pre id="var-usage">Usage: (rtrim s)
</pre>
<pre id="var-docstr">Removes whitespace from the right side of string.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L299" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -427,7 +477,9 @@ Allowed argument types for pattern and replacement are:
</pre>
<pre id="var-docstr">Splits string on a regular expression. Optional argument limit is
the maximum number of splits.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L353" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -436,7 +488,9 @@ the maximum number of splits.</pre>
<pre id="var-usage">Usage: (split-lines s)
</pre>
<pre id="var-docstr">Splits s on \n or \r\n.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L304" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -448,7 +502,9 @@ the maximum number of splits.</pre>
Handles Unicode supplementary characters correctly. Uses the
locale-sensitive String.toUpperCase() and String.toLowerCase()
methods.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L267" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -457,7 +513,9 @@ methods.</pre>
<pre id="var-usage">Usage: (tail s n)
</pre>
<pre id="var-docstr">Returns the last n characters of s.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L139" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -469,7 +527,9 @@ methods.</pre>
Note the argument order is the opposite of clojure.core/take; this
is to keep the string as the first argument for use with -&gt;</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L107" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -478,7 +538,9 @@ is to keep the string as the first argument for use with -&gt;</pre>
<pre id="var-usage">Usage: (trim s)
</pre>
<pre id="var-docstr">Removes whitespace from both ends of string.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L359" id="var-source">Source</a>
+
+
+
</div><div id="var-entry">
<br />
<hr />
@@ -487,7 +549,9 @@ is to keep the string as the first argument for use with -&gt;</pre>
<pre id="var-usage">Usage: (upper-case s)
</pre>
<pre id="var-docstr">Converts string to all upper-case.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/a1c66df5287776b4397cf3929a5f498fbb34ea32/src/main/clojure/clojure/contrib/str_utils2.clj#L343" id="var-source">Source</a>
+
+
+
</div>