Liking cljdoc? Tell your friends :D

wreck.api

The public API of wreck.

Notes:

  • Apart from passing through nil, this library does minimal argument checking, since the rules for regexes vary from platform to platform, and it is a first class requirement that callers be allowed to construct platform specific regexes if they wish.
  • As a result, all functions have the potential to throw platform-specific exceptions if the resulting regex is syntactically invalid.
    • On the JVM, these will typically be instances of the java.util.regex.PatternSyntaxException class.
    • On JavaScript, these will typically be a js/SyntaxError.
  • Platform specific behaviour is particularly notable for short / empty regexes, such as #"{}" (an error on the JVM, fine but nonsensical on JS) and #"{1}" (ironically, fine but nonsensical on the JVM, but an error on JS). 🤡
  • Furthemore, JavaScript fundamentally doesn't support lossless round-tripping of RegExp objects to Strings and back, something this library relies upon and does extensively. The library makes a best effort to correct JavaScript's problematic implementation, but because it's fundamentally lossy there are some cases that (on ClojureScript only) may change your regexes in unexpected (though probably not semantically significant) ways.
  • Regex flags (which aren't natively supported by Clojure's regex literals, so may be uncommon) are supported to the best ability of the library, but please carefully review the usage notes in README.md for various caveats, especially on ClojureScript.
The public API of [`wreck`](https://github.com/pmonks/wreck).

Notes:

* Apart from passing through `nil`, this library does minimal argument
  checking, since the rules for regexes vary from platform to platform, and it
  is a first class requirement that callers be allowed to construct platform
  specific regexes if they wish.
* As a result, all functions have the potential to throw platform-specific
  exceptions if the resulting regex is syntactically invalid.
  * On the JVM, these will typically be instances of the
    `java.util.regex.PatternSyntaxException` class.
  * On JavaScript, these will typically be a `js/SyntaxError`.
* Platform specific behaviour is particularly notable for short / empty
  regexes, such as `#"{}"` (an error on the JVM, fine but
  nonsensical on JS) and `#"{1}"` (ironically, fine but nonsensical on the
  JVM, but an error on JS).  🤡
* Furthemore, JavaScript fundamentally doesn't support lossless round-tripping
  of `RegExp` objects to `String`s and back, something this library relies
  upon and does extensively.  The library makes a best effort to correct
  JavaScript's problematic implementation, but because it's fundamentally
  lossy there are some cases that (on ClojureScript only) may change your
  regexes in unexpected (though _probably_ not semantically significant) ways.
* Regex flags (which aren't natively supported by Clojure's regex literals, so
  may be uncommon) are supported to the best ability of the library, but
  please carefully review the [usage notes in README.md](https://github.com/pmonks/wreck?tab=readme-ov-file#usage)
  for various caveats, especially on ClojureScript.
raw docstring

='clj/s

(=' _)
(=' re1 re2)
(=' re1 re2 & more)

Equality for regexes, defined by having equal String representations (as per str') and flags (as per flags). This means that equivalent regexes (e.g. #"..." and #".{3}" will not be considered equal.

Equality for regexes, defined by having equal `String` representations (as
per [[str']]) and flags (as per [[flags]]).  This means that _equivalent_
regexes (e.g. `#"..."` and `#".{3}"` will _not_ be considered equal.
sourceraw docstring

altclj/s

(alt & res)

Returns a regex that will match any one of res, via alternation.

Notes:

  • Duplicate elements in res will only appear once in the result.
  • Does not wrap the result in a group, which, because alternation has the lowest precedence in regexes, runs the risk of behaving unexpectedly if the result is then combined with further regexes. tl;dr - one of the grouping variants should almost always be preferred.
Returns a regex that will match any one of `res`, via alternation.

Notes:

* Duplicate elements in `res` will only appear once in the result.
* Does _not_ wrap the result in a group, which, [because alternation has the
  lowest precedence in regexes](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04_08),
  runs the risk of behaving unexpectedly if the result is then combined with
  further regexes.
  tl;dr - one of the grouping variants should _almost always_ be preferred.
sourceraw docstring

alt-cgclj/s

(alt-cg & res)

alt then cg.

[[alt]] then [[cg]].
sourceraw docstring

alt-grpclj/s

(alt-grp & res)

alt then grp.

[[alt]] then [[grp]].
sourceraw docstring

alt-ncgclj/s

(alt-ncg nm & res)

alt then ncg.

[[alt]] then [[ncg]].
sourceraw docstring

and'clj/s

(and' a b)
(and' a b s)

Returns an 'and' regex that will match a and b in any order, and with the separator regex (if provided) between them. This is implemented as ASB|BSA, which means that A and B must be distinct (must not match the same text).

Notes:

  • May optimise the expression (via de-duplication in alt).
  • Does not wrap the result in a group, which, because alternation has the lowest precedence in regexes, runs the risk of behaving unexpectedly if the result is then combined with further regexes. tl;dr - one of the grouping variants should almost always be preferred.
Returns an 'and' regex that will match `a` and `b` in any order, and with the
`s`eparator regex (if provided) between them.  This is implemented as
`ASB|BSA`, which means that A and B must be distinct (must not match the same
text).

Notes:

* May optimise the expression (via de-duplication in [[alt]]).
* Does _not_ wrap the result in a group, which, [because alternation has the
  lowest precedence in regexes](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04_08),
  runs the risk of behaving unexpectedly if the result is then combined with
  further regexes.
  tl;dr - one of the grouping variants should _almost always_ be preferred.
sourceraw docstring

and-cgclj/s

(and-cg a b)
(and-cg a b s)

and' then cg.

Notes:

  • Unlike most other -cg fns, this one does not accept any number of res.
  • May optimise the expression (via de-duplication in alt).
[[and']] then [[cg]].

Notes:

* Unlike most other `-cg` fns, this one does _not_ accept any number of res.
* May optimise the expression (via de-duplication in [[alt]]).
sourceraw docstring

and-grpclj/s

(and-grp a b)
(and-grp a b s)

and' then grp.

Notes:

  • Unlike most other -grp fns, this one does not accept any number of res.
  • May optimise the expression (via de-duplication in alt).
[[and']] then [[grp]].

Notes:

* Unlike most other `-grp` fns, this one does _not_ accept any number of res.
* May optimise the expression (via de-duplication in [[alt]]).
sourceraw docstring

and-ncgclj/s

(and-ncg nm a b)
(and-ncg nm a b s)

and' then ncg.

Notes:

  • Unlike most other -ncg fns, this one does not accept any number of res.
  • May optimise the expression (via de-duplication in alt).
[[and']] then [[ncg]].

Notes:

* Unlike most other `-ncg` fns, this one does _not_ accept any number of res.
* May optimise the expression (via de-duplication in [[alt]]).
sourceraw docstring

cgclj/s

(cg & res)

As for grp, but uses a capturing group.

As for [[grp]], but uses a capturing group.
sourceraw docstring

embed-flagsclj

(embed-flags re)

Embeds any flags found in re at the start of re in a non-capturing group (to ensure scoping), returning a new regex. Returns re if re contains no flags or is nil.

For example #"(?i)[abc]+" would become #"(?i:[abc]+)".

Note:

  • This function is only available on the JVM. JavaScript's regex engine does not support embedded flags.
  • This function is primarily intended for internal use by wreck, but is useful in those rare cases where Clojure code receives a 3rd party regex, wishes to use it as part of composing a larger regex, and doesn't know if it contains flags or not. In all other cases, flags-grp is a better choice.
  • Embedded flags in the middle of re will be moved to the beginning of the regex. This may alter the semantics of the regex - for example a(?i)b will become (?i:ab), which means that a will be matched case- insensitively by the result, which is not the same as the original (which matches lower-case a only). This is an unavoidable consequence of how the JVM regex engine reports embedded flags. If you really need to use an embedded flag midway through a regex, use flags-grp.
Embeds any flags found in `re` at the start of `re` in a non-capturing group
(to ensure scoping), returning a new regex.  Returns `re` if `re` contains no
flags or is `nil`.

For example `#"(?i)[abc]+"` would become `#"(?i:[abc]+)"`.

Note:

* This function is only available on the JVM. JavaScript's regex engine does
  not support embedded flags.
* This function is primarily intended for internal use by `wreck`, but is
  useful in those rare cases where Clojure code receives a 3rd party regex,
  wishes to use it as part of composing a larger regex, and doesn't know if it
  contains flags or not.  In all other cases, [[flags-grp]] is a better
  choice.
* Embedded flags in the middle of `re` will be moved to the beginning of the
  regex.  This may alter the semantics of the regex - for example `a(?i)b`
  will become `(?i:ab)`, which means that `a` will be matched case-
  insensitively by the result, which is _not_ the same as the original (which
  matches lower-case `a` only). This is an unavoidable consequence of how the
  JVM regex engine reports embedded flags.  If you really need to use an
  embedded flag midway through a regex, use [[flags-grp]].
sourceraw docstring

empty?'clj/s

(empty?' re)

Is re nil or (=' #"")?

Notes:

  • Takes flags (if any) into account.
Is `re` `nil` or `(=' #"")`?

Notes:

* Takes flags (if any) into account.
sourceraw docstring

escclj/s

(esc s)

Escapes s (a String) for use in a regex, returning a String.

Notes:

  • unlike most other fns in this namespace, this one does not support a regex as an input, nor return a regex as an output
Escapes `s` (a `String`) for use in a regex, returning a `String`.

Notes:

* unlike most other fns in this namespace, this one does _not_ support a regex
  as an input, nor return a regex as an output
sourceraw docstring

exnclj/s

(exn n re)

Returns a regex where re will match exactly n times.

Returns a regex where `re` will match exactly `n` times.
sourceraw docstring

exn-cgclj/s

(exn-cg n & res)

cg then exn.

[[cg]] then [[exn]].
sourceraw docstring

exn-grpclj/s

(exn-grp n & res)

grp then exn.

[[grp]] then [[exn]].
sourceraw docstring

exn-ncgclj/s

(exn-ncg nm n & res)

ncg then exn.

[[ncg]] then [[exn]].
sourceraw docstring

flagsclj/s

(flags re)

Returns the flags for re as a set of characters, or nil if re doesn't have any or is not a regex.

Notes:

  • on the JVM, flags that don't have an embedded equivalent (as of JVM 25, LITERAL and CANON_EQ) will cause an ex-info to be thrown. If you specifically need to handle these flags, raw-flags may be useful but it should only be used as a last resort as its behaviour is platform specific.
  • the JVM considers some but not all embedded flags as flags. See the unit tests for details.
Returns the flags for `re` as a set of characters, or `nil` if `re` doesn't
have any or is not a regex.

Notes:

* on the JVM, flags that don't have an embedded equivalent (as of JVM 25,
  `LITERAL` and `CANON_EQ`) will cause an `ex-info` to be thrown. If you
  specifically need to handle these flags, [[raw-flags]] may be useful but it
  should only be used as a last resort as its behaviour is platform specific.
* the JVM considers _some but not all_ embedded flags as flags. See the unit
  tests for details.
sourceraw docstring

flags-grpclj

(flags-grp flgs & res)

As for grp, but prefixes the group with flgs (a set of regex flag characters, such as those returned by flags). See the 'special constructs' section of the java.util.regex.Pattern JavaDoc for the set of valid flag characters.

Notes:

  • This function is only available on the JVM. JavaScript's regex engine does not support embedded flags.
As for [[grp]], but prefixes the group with `flgs` (a set of regex flag
characters, such as those returned by [[flags]]).  See the ['special
constructs' section of the `java.util.regex.Pattern` JavaDoc](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/regex/Pattern.html#special)
for the set of valid flag characters.

Notes:

* This function is only available on the JVM. JavaScript's regex engine does
  not support embedded flags.
sourceraw docstring

grpclj/s

(grp & res)

As for join, but encloses the joined res into a single non-capturing group.

As for [[join]], but encloses the joined `res` into a single non-capturing
group.
sourceraw docstring

has-flags?clj/s

(has-flags? re)

Does re have any flags?

Notes:

  • returns false if re is not a regex
  • the JVM considers some but not all embedded flags as flags. See the unit tests for details.
Does `re` have any flags?

Notes:

* returns `false` if `re` is not a regex
* the JVM considers _some but not all_ embedded flags as flags. See the unit
  tests for details.
sourceraw docstring

joinclj/s

(join & res)

Returns a regex that is all of the res joined together. Each element in res can be a regex, a String or something that can be turned into a String (including numbers, etc.). Returns nil when no res are provided, or they're all nil.

Notes:

  • In ClojureScript be cautious about using numbers in these calls, since JavaScript's number handling is a 🤡show. See the unit tests for examples.
Returns a regex that is all of the `res` joined together. Each element in
`res` can be a regex, a `String` or something that can be turned into a
`String` (including numbers, etc.).  Returns `nil` when no `res` are provided,
or they're all `nil`.

Notes:

* In ClojureScript be cautious about using numbers in these calls, since
  JavaScript's number handling is a 🤡show.  See the unit tests for examples.
sourceraw docstring

n2mclj/s

(n2m n m re)

Returns a regex where re will match from n to m times.

Returns a regex where `re` will match from `n` to `m` times.
sourceraw docstring

n2m-cgclj/s

(n2m-cg n m & res)

cg then n2m.

[[cg]] then [[n2m]].
sourceraw docstring

n2m-grpclj/s

(n2m-grp n m & res)

grp then n2m.

[[grp]] then [[n2m]].
sourceraw docstring

n2m-ncgclj/s

(n2m-ncg nm n m & res)

ncg then n2m.

[[ncg]] then [[n2m]].
sourceraw docstring

ncgclj/s

(ncg nm & res)

As for grp, but uses a named capturing group named nm. Returns nil if nm is nil or blank. Throws if nm is an invalid name for a named capturing group (alphanumeric only, must start with an alphabetical character, must be unique within the regex).

As for [[grp]], but uses a named capturing group named `nm`.  Returns `nil` if
`nm` is `nil` or blank. Throws if `nm` is an invalid name for a named capturing
group (alphanumeric only, must start with an alphabetical character, must be
unique within the regex).
sourceraw docstring

nomclj/s

(nom n re)

Returns a regex where re will match n or more times.

Returns a regex where `re` will match `n` or more times.
sourceraw docstring

nom-cgclj/s

(nom-cg n & res)

cg then nom.

[[cg]] then [[nom]].
sourceraw docstring

nom-grpclj/s

(nom-grp n & res)

grp then nom.

[[grp]] then [[nom]].
sourceraw docstring

nom-ncgclj/s

(nom-ncg nm n & res)

ncg then nom.

[[ncg]] then [[nom]].
sourceraw docstring

oomclj/s

(oom re)

Returns a regex where re will match one or more times.

Returns a regex where `re` will match one or more times.
sourceraw docstring

oom-cgclj/s

(oom-cg & res)

cg then oom.

[[cg]] then [[oom]].
sourceraw docstring

oom-grpclj/s

(oom-grp & res)

grp then oom.

[[grp]] then [[oom]].
sourceraw docstring

oom-ncgclj/s

(oom-ncg nm & res)

ncg then oom.

[[ncg]] then [[oom]].
sourceraw docstring

optclj/s

(opt re)

Returns a regex where re is optional.

Returns a regex where `re` is optional.
sourceraw docstring

opt-cgclj/s

(opt-cg & res)

cg then opt.

[[cg]] then [[opt]].
sourceraw docstring

opt-grpclj/s

(opt-grp & res)

grp then opt.

[[grp]] then [[opt]].
sourceraw docstring

opt-ncgclj/s

(opt-ncg nm & res)

ncg then opt.

[[ncg]] then [[opt]].
sourceraw docstring

or'clj/s

(or' a b)
(or' a b s)

Returns an 'inclusive or' regex that will match a or b, or both, in any order, and with the separator regex (if provided) between them. This is implemented as ASB|BSA|A|B, which means that A and B must be distinct (must not match the same text).

Notes:

  • May optimise the expression (via de-duplication in alt).
  • Does not wrap the result in a group, which, because alternation has the lowest precedence in regexes, runs the risk of behaving unexpectedly if the result is then combined with further regexes. tl;dr - one of the grouping variants should almost always be preferred.
Returns an 'inclusive or' regex that will match `a` or `b`, or both, in any
order, and with the `s`eparator regex (if provided) between them.  This is
implemented as `ASB|BSA|A|B`, which means that A and B must be distinct (must
not match the same text).

Notes:

* May optimise the expression (via de-duplication in [[alt]]).
* Does _not_ wrap the result in a group, which, [because alternation has the
  lowest precedence in regexes](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04_08),
  runs the risk of behaving unexpectedly if the result is then combined with
  further regexes.
  tl;dr - one of the grouping variants should _almost always_ be preferred.
sourceraw docstring

or-cgclj/s

(or-cg a b)
(or-cg a b s)

or' then cg.

Notes:

  • Unlike most other -cg fns, this one does not accept any number of res.
  • May optimise the expression (via de-duplication in alt).
[[or']] then [[cg]].

Notes:

* Unlike most other `-cg` fns, this one does _not_ accept any number of res.
* May optimise the expression (via de-duplication in [[alt]]).
sourceraw docstring

or-grpclj/s

(or-grp a b)
(or-grp a b s)

or' then grp.

Notes:

  • Unlike most other -grp fns, this one does not accept any number of res.
  • May optimise the expression (via de-duplication in alt).
[[or']] then [[grp]].

Notes:

* Unlike most other `-grp` fns, this one does _not_ accept any number of res.
* May optimise the expression (via de-duplication in [[alt]]).
sourceraw docstring

or-ncgclj/s

(or-ncg nm a b)
(or-ncg nm a b s)

or' then ncg.

Notes:

  • Unlike most other -ncg fns, this one does not accept any number of res.
  • May optimise the expression (via de-duplication in alt).
[[or']] then [[ncg]].

Notes:

* Unlike most other `-ncg` fns, this one does _not_ accept any number of res.
* May optimise the expression (via de-duplication in [[alt]]).
sourceraw docstring

qotclj/s

(qot re)

Quotes re (anything that can be accepted by join), returning a regex.

Quotes `re` (anything that can be accepted by [[join]]), returning a regex.
sourceraw docstring

raw-flagsclj/s

(raw-flags re)

Returns the raw, platform specific flags in re. On the JVM this is an int, on JavaScript this is a String. If re has no flags, or re is not a regex, returns nil.

⚠️ Because this function has platform specific behaviour, it is strongly recommended that callers use flags instead (that function is not platform specific, at least in its contract). The one reasonable exception to this guideline is on the JVM, in the narrow case where a caller needs to check for a non-embeddable flag (as of JVM 25, LITERAL and CANON_EQ) - in that case flags throws, which may be a hindrance.

Notes:

  • the JVM considers some but not all embedded flags as flags. See the unit tests for details.
Returns the raw, platform specific flags in `re`. On the JVM this is an
`int`, on JavaScript this is a `String`.  If `re` has no flags, or `re` is not
a regex, returns `nil`.

⚠️ Because this function has platform specific behaviour, it is _strongly_
recommended that callers use [[flags]] instead (that function is _not_
platform specific, at least in its contract).  The one reasonable exception to
this guideline is on the JVM, in the narrow case where a caller needs to check
for a non-embeddable flag (as of JVM 25, `LITERAL` and `CANON_EQ`) - in that
case [[flags]] throws, which may be a hindrance.

Notes:

* the JVM considers _some but not all_ embedded flags as flags. See the unit
  tests for details.
sourceraw docstring

set-flagsclj/s

(set-flags re flgs)

Sets the flags on re to flgs (a set of flag characters, such as those returned by flags - may also be nil to strip all flags), returning a new regex. All existing flags in re are replaced. Returns nil if re is nil.

⚠️ Because this function has platform specific behaviour, its use is discouraged.

On the JVM, it's strongly recommended to use flags-grp instead of this function, since that gives explicit control over how multiple regexes with different flag sets compose together.

On JavaScript there's no choice - JavaScript's regex engine doesn't support embedded flags so flags always apply globally. It is therefore recommended to keep flags out of regex fragments used for composition entirely, and only settings flags (if needed) globally to the final, fully composed regex, using this function.

Note:

  • Throws if flgs contains invalid flag characters.
  • On the JVM, all programmatic AND embedded flags in the regex will be removed, except embedded flags that appear in a non-capturing group (those will be retained, since the JVM doesn't consider them to be 'flags').
  • On the JVM, the flags will be set via a non-capturing group at the start of the regex that encloses the entire thing. This ensures that regexes with flags can be safely combined with other regexes with different flags, with correct scoping of each regex's flags. It also means that flags do not round-trip between flags and set-flags (unlike on JavaScript).
  • On JavaScript, the flags will be set programmatically (i.e. globally for the entire regex), since JavaScript's regex engine doesn't support embedded flags of any kind (and therefore flags can't be scoped to subsets of a regex). This is obviously a problem if you're trying to compose regexes that have mutually exclusive flags.
Sets the flags on `re` to `flgs` (a set of flag characters, such as those
returned by [[flags]] - may also be `nil` to strip all flags), returning a new
regex.  All existing flags in `re` are replaced.  Returns `nil` if `re` is
`nil`.

⚠️ Because this function has platform specific behaviour, its use is
discouraged.

On the JVM, it's _strongly_ recommended to use [[flags-grp]] instead of this
function, since that gives explicit control over how multiple regexes with
different flag sets compose together.

On JavaScript there's no choice - JavaScript's regex engine doesn't support
embedded flags so flags always apply globally.  It is therefore recommended to
keep flags out of regex fragments used for composition entirely, and only
settings flags (if needed) globally to the final, fully composed regex, using
this function.

Note:

* Throws if `flgs` contains invalid flag characters.
* On the JVM, all programmatic AND embedded flags in the regex will be
  removed, except embedded flags that appear in a non-capturing group (those
  will be retained, since the JVM doesn't consider them to be 'flags').
* On the JVM, the flags will be set via a non-capturing group at the start of
  the regex that encloses the entire thing.  This ensures that regexes with
  flags can be safely combined with other regexes with different flags, with
  correct scoping of each regex's flags.  It also means that flags do _not_
  round-trip between [[flags]] and [[set-flags]] (unlike on JavaScript).
* On JavaScript, the flags will be set programmatically (i.e. globally for the
  entire regex), since JavaScript's regex engine doesn't support embedded
  flags of any kind (and therefore flags can't be scoped to subsets of a
  regex).  This is obviously a problem if you're trying to compose regexes
  that have mutually exclusive flags.
sourceraw docstring

str'clj/s

(str' o)

Returns the String representation of o, with special handling for RegExp objects on ClojureScript in an attempt to correct JavaScript's APPALLING default stringification.

Notes:

  • On the JVM will embed all flags (as per embed-flags).
  • On JavaScript this will silently drop flags. You may use flags and set-flags in combination to preserve flags if needed, but note that JavaScript only supports global flags - unlike the JVM there is no way to scope flags to subsets of a regex.
Returns the `String` representation of `o`, with special handling for
`RegExp` objects on ClojureScript in an attempt to correct JavaScript's
**APPALLING** default stringification.

Notes:

* On the JVM will embed all flags (as per [[embed-flags]]).
* On JavaScript this will silently drop flags.  You may use [[flags]] and
  [[set-flags]] in combination to preserve flags if needed, but note that
  JavaScript only supports global flags - unlike the JVM there is no way to
  scope flags to subsets of a regex.
sourceraw docstring

xor'clj/s

(xor' a b)

Returns an 'exclusive or' regex that will match a or b, but not both. This is identical to alt called with 2 arguments, and is provided as a convenience for those who might be building up large logic based regexes and would prefer to use more easily understood logical operator names throughout.

Notes:

  • May optimise the expression (via de-duplication in alt).
  • Does not wrap the result in a group, which, because alternation has the lowest precedence in regexes, runs the risk of behaving unexpectedly if the result is then combined with further regexes. tl;dr - one of the grouping variants should almost always be preferred.
Returns an 'exclusive or' regex that will match `a` or `b`, but _not_ both.
This is identical to [[alt]] called with 2 arguments, and is provided as a
convenience for those who might be building up large logic based regexes and
would prefer to use more easily understood logical operator names throughout.

Notes:

* May optimise the expression (via de-duplication in [[alt]]).
* Does _not_ wrap the result in a group, which, [because alternation has the
  lowest precedence in regexes](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04_08),
  runs the risk of behaving unexpectedly if the result is then combined with
  further regexes.
  tl;dr - one of the grouping variants should _almost always_ be preferred.
sourceraw docstring

xor-cgclj/s

(xor-cg a b)

xor' then cg.

Notes:

  • Unlike most other -cg fns, this one does not accept any number of res.
  • May optimise the expression (via de-duplication in alt).
[[xor']] then [[cg]].

Notes:

* Unlike most other `-cg` fns, this one does _not_ accept any number of res.
* May optimise the expression (via de-duplication in [[alt]]).
sourceraw docstring

xor-grpclj/s

(xor-grp a b)

xor' then grp.

Notes:

  • Unlike most other -grp fns, this one does not accept any number of res.
  • May optimise the expression (via de-duplication in alt).
[[xor']] then [[grp]].

Notes:

* Unlike most other `-grp` fns, this one does _not_ accept any number of res.
* May optimise the expression (via de-duplication in [[alt]]).
sourceraw docstring

xor-ncgclj/s

(xor-ncg nm a b)

xor' then ncg.

Notes:

  • Unlike most other -ncg fns, this one does not accept any number of res.
  • May optimise the expression (via de-duplication in alt).
[[xor']] then [[ncg]].

Notes:

* Unlike most other `-ncg` fns, this one does _not_ accept any number of res.
* May optimise the expression (via de-duplication in [[alt]]).
sourceraw docstring

zomclj/s

(zom re)

Returns a regex where re will match zero or more times.

Returns a regex where `re` will match zero or more times.
sourceraw docstring

zom-cgclj/s

(zom-cg & res)

cg then zom.

[[cg]] then [[zom]].
sourceraw docstring

zom-grpclj/s

(zom-grp & res)

grp then zom.

[[grp]] then [[zom]].
sourceraw docstring

zom-ncgclj/s

(zom-ncg nm & res)

ncg then zom.

[[ncg]] then [[zom]].
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close