API for str-utils - clojure-contrib v1.2 (stable)

by Stuart Sierra

clojure-contrib is now deprecated

clojure-contrib is no longer being developed or maintained.

Rather than a single, monolithic, contributions library, Clojure now has a set of separate libraries for each unit of functionality. The libraries are in the Clojure GitHub organization at https://github.com/clojure. API documentation of the libraries can be found at https://clojure.github.io.

If you're looking for a specific function or namespace from the old clojure-contrib, see "Where Did Clojure.Contrib Go".


Full namespace name: clojure.contrib.str-utils

Overview

String utilities for Clojure
Deprecated since clojure-contrib version 1.2

Public Variables and Functions



chomp

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (chomp s)
Removes all trailing newline \n or return \r characters from
string.  Note: String.trim() is similar and faster.
Source


chop

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (chop s)
Removes the last character of string.
Source


re-gsub

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (re-gsub regex replacement string)
Replaces all instances of 'pattern' in 'string' with
'replacement'.  Like Ruby's 'String#gsub'.

If (ifn? replacment) is true, the replacement is called with the
match.
Source


re-partition

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (re-partition re string)
Splits the string into a lazy sequence of substrings, alternating
between substrings that match the patthern and the substrings
between the matches.  The sequence always starts with the substring
before the first match, or an empty string if the beginning of the
string matches.

For example: (re-partition #"[a-z]+" "abc123def")

Returns: ("" "abc" "123" "def")
Source


re-split

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (re-split pattern string)
       (re-split pattern string limit)
Splits the string on instances of 'pattern'.  Returns a sequence of
strings.  Optional 'limit' argument is the maximum number of
splits.  Like Perl's 'split'.
Source


re-sub

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (re-sub regex replacement string)
Replaces the first instance of 'pattern' in 'string' with
'replacement'.  Like Ruby's 'String#sub'.

If (ifn? replacement) is true, the replacement is called with
the match.
Source


str-join

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (str-join separator sequence)
Returns a string of all elements in 'sequence', separated by
'separator'.  Like Perl's 'join'.
Source
Logo & site design by Tom Hickey.
Clojure auto-documentation system by Tom Faulhaber.