Liking cljdoc? Tell your friends :D

lice-comb.impl.utils

General purpose utility fns that I seem to end up needing in every single project I write... Note: this namespace is not part of the public API of lice-comb and may change without notice.

General purpose utility fns that I seem to end up needing in every single
project I write... Note: this namespace is not part of the public API of
lice-comb and may change without notice.
raw docstring

base62-decodeclj

(base62-decode s)

Decodes the given Base62/UTF-8 string.

Decodes the given Base62/UTF-8 string.
sourceraw docstring

base62-encodeclj

(base62-encode s)

Encodes the given string to Base62/UTF-8.

Encodes the given string to Base62/UTF-8.
sourceraw docstring

escape-reclj

(escape-re s)

Escapes the given string for use in a regex.

Escapes the given string for use in a regex.
sourceraw docstring

filenamecljmultimethod

Returns just the name component of the given file-like thing (String, File, ZipEntry, URI, URL), excluding any parents.

Returns just the name component of the given file-like thing (String, File,
ZipEntry, URI, URL), excluding any parents.
sourceraw docstring

filepathcljmultimethod

Returns the full path and name of the given file-like thing (String, File, ZipEntry, URI, URL).

Returns the full path and name of the given file-like thing (String, File,
ZipEntry, URI, URL).
sourceraw docstring

filter-file-only-seqclj

(filter-file-only-seq dir dir-pred file-pred)

As for clojure.core/file-seq, with support for filtering and only returns files (but not any directories that were traversed during the seq). dir-pred controls which directories will be recursed into. file-pred controls which files will be included in the result. Both must be a predicate of one argument of type java.io.File.

As for clojure.core/file-seq, with support for filtering and only returns
files (but not any directories that were traversed during the seq).  dir-pred
controls which directories will be recursed into.  file-pred controls which
files will be included in the result.  Both must be a predicate of one
argument of type java.io.File.
sourceraw docstring

filter-file-seqclj

(filter-file-seq dir dir-pred file-pred)

As for clojure.core/file-seq, but with support for filtering. dir-pred controls which directories will be included in the result and recursed into. file-pred controls which files will be included in the result. Both must be a predicate of one argument of type java.io.File.

Note also that dir is always returned, even if it does not meet dir-pred.

As for clojure.core/file-seq, but with support for filtering.  dir-pred
controls which directories will be included in the result and recursed into.
file-pred controls which files will be included in the result.  Both must be
a predicate of one argument of type java.io.File.

Note also that dir is always returned, even if it does not meet dir-pred.
sourceraw docstring

filter-file-seq*clj

(filter-file-seq* dir pred)

As for clojure.core/file-seq, but with support for filtering. pred must be a predicate that accepts one argument of type java.io.File. Files that don't meet pred will not be included in the result, and directories that don't meet pred will not be recursed into (so pred must be able to handle both distinct cases).

Note also that dir is always returned, even if it does not meet pred.

As for clojure.core/file-seq, but with support for filtering.  pred must be
a predicate that accepts one argument of type java.io.File.  Files that don't
meet pred will not be included in the result, and directories that don't meet
pred will not be recursed into (so pred must be able to handle both distinct
cases).

Note also that dir is always returned, even if it does not meet pred.
sourceraw docstring

getenvclj

(getenv var)
(getenv var default)

Obtain the given environment variable, returning default (or nil, if default is not provided) if it isn't set.

Obtain the given environment variable, returning default (or nil, if default
is not provided) if it isn't set.
sourceraw docstring

is-digits?clj

(is-digits? s)

Does the given string contains digits only?

Does the given string contains digits only?
sourceraw docstring

map-padclj

(map-pad f & cs)

Like map, but when presented with multiple collections of different lengths, 'pads out' the missing elements with nil rather than terminating early.

Like map, but when presented with multiple collections of different lengths,
'pads out' the missing elements with nil rather than terminating early.
sourceraw docstring

mapfonkclj

(mapfonk f m)

Returns a new map where f has been applied to all of the keys of m.

Returns a new map where f has been applied to all of the keys of m.
sourceraw docstring

mapfonvclj

(mapfonv f m)

Returns a new map where f has been applied to all of the values of m.

Returns a new map where f has been applied to all of the values of m.
sourceraw docstring

nsetclj

(nset coll)

nil preserving version of clojure.core/set

nil preserving version of clojure.core/set
sourceraw docstring

re-concatclj

(re-concat & res)

Concatenate all of the given regexes or strings into a single regex.

Concatenate all of the given regexes or strings into a single regex.
sourceraw docstring

readable-dir?clj

(readable-dir? d)

Is d (a String or File) a readable directory?

Is d (a String or File) a readable directory?
sourceraw docstring

readable-file?cljmultimethod

Is f (a String, File, InputStream, or Reader) a readable file?

Is f (a String, File, InputStream, or Reader) a readable file?
sourceraw docstring

simplify-uriclj

(simplify-uri uri)

Simplifies a URI (which can be a string, java.net.URL, or java.net.URI) if possible, returning a String. Returns nil if the input is nil or blank.

Simplifies a URI (which can be a string, java.net.URL, or java.net.URI) if
possible, returning a String. Returns nil if the input is nil or blank.
sourceraw docstring

strimclj

(strim s)

nil safe version of clojure.string/trim

nil safe version of clojure.string/trim
sourceraw docstring

valid-http-uri?clj

(valid-http-uri? s)

Returns true if given string is a valid HTTP or HTTPS URI.

Returns true if given string is a valid HTTP or HTTPS URI.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close