(->coll x)
Coerces x into a collection - if x is already a collection it is returned, otherwise a singleton collection containing x.
Coerces x into a collection - if x is already a collection it is returned, otherwise a singleton collection containing x.
(assoc-if m condition k v)
Associates v with the key k in the associative structure m if condition is truthy, otherwise returns m.
Associates v with the key k in the associative structure m if condition is truthy, otherwise returns m.
(equals-ignore-case? s1 s2)
Whether two string are equal ignoring case differences. Nil references are considered equal.
Whether two string are equal ignoring case differences. Nil references are considered equal.
(filter-values pred m)
Filters a map given a predicate on the values.
Filters a map given a predicate on the values.
(get-declared-method cls method-name arg-types)
(ignore-exceptions & body)
(invoke-method method args)
(invoke-method method receiver args)
Invokes the given Method instance with the given arguments and receiver if one is specified. Unwraps the inner exception if an InvocationTargetException is thrown.
Invokes the given Method instance with the given arguments and receiver if one is specified. Unwraps the inner exception if an InvocationTargetException is thrown.
(liberal-concat & seqs)
Version of concat which avoids holding onto the heads of the argument functions
Version of concat which avoids holding onto the heads of the argument functions
(liberal-mapcat f s)
Version of mapcat which avoids holding onto the heads of the generated subsequences.
Version of mapcat which avoids holding onto the heads of the generated subsequences.
(map-keys f m)
Transforms the keys in a map according to the given function.
Transforms the keys in a map according to the given function.
(map-values f m)
Transforms the values in a map according to the given function.
Transforms the values in a map according to the given function.
(non-negative? x)
Whether the given value is a non-negative number.
Whether the given value is a non-negative number.
Does path and scheme-based normalisation for HTTP and HTTPS URIs, path-based normalisation for other URIs.
Does path and scheme-based normalisation for HTTP and HTTPS URIs, path-based normalisation for other URIs.
(owning-iterator source factory-fn)
Returns an iterator which takes ownership of source and uses it to construct an inner iterator via factory-fn. Automatically closes source when the inner iterator is exhausted, or if an exception is thrown during the iteration.
Returns an iterator which takes ownership of source and uses it to construct an inner iterator via factory-fn. Automatically closes source when the inner iterator is exhausted, or if an exception is thrown during the iteration.
(parse-hex-string string-value)
Parses a hex string into a byte array
Parses a hex string into a byte array
(partition-keys source-map ref-keys)
Splits a source map into two sub-maps - the first contain the keys in both source-map and ref-keys, the second contains the keys in source-map which do not exist in ref-keys.
Splits a source map into two sub-maps - the first contain the keys in both source-map and ref-keys, the second contains the keys in source-map which do not exist in ref-keys.
(percent-decode s)
Decodes a percent-encoded string. Assumes all characters in the input are in the ASCII range. Throws an IllegalArgumentException if the input is malformed.
Decodes a percent-encoded string. Assumes all characters in the input are in the ASCII range. Throws an IllegalArgumentException if the input is malformed.
(percent-encode s)
(percent-encode s charset)
Percent-encodes the bytes in the given string.
Percent-encodes the bytes in the given string.
(read-json source)
Reads a JSON map from an underlying source.
Reads a JSON map from an underlying source.
(remove-fragment uri)
Sets the fragment on a URI to nil.
Sets the fragment on a URI to nil.
(resolve-uri base-uri rel)
Resolves the given string against a base URI. This differs from java.net.URI/resolve in that empty strings are ignored and return the base URI is returned unaltered.
Resolves the given string against a base URI. This differs from java.net.URI/resolve in that empty strings are ignored and return the base URI is returned unaltered.
(select-keys-as m key-mapping)
Selects keys from the source map m, renaming them to the mapped keys in the result map e.g.
(select-keys-as {"foo" 1 "bar" 2} {"foo" :a "quux" :b}) => {:a 1}
Selects keys from the source map m, renaming them to the mapped keys in the result map e.g. (select-keys-as {"foo" 1 "bar" 2} {"foo" :a "quux" :b}) => {:a 1}
(set-fragment uri fragment)
Sets the fragment on a URI to the given value.
Sets the fragment on a URI to the given value.
(to-hex-string arr)
Returns the hex representation of a byte array
Returns the hex representation of a byte array
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close