Internal implementation details of wreck. This is not part of the public API of wreck and is subject to change without notice.
Internal implementation details of wreck. This is not part of the public API of wreck and is subject to change without notice.
(flags re)
Returns the flags for re
as a String
, or nil
if re
doesn't have any
or is not a regex.
Notes:
LITERAL
and CANON_EQ
) will be silently dropped. Use
[[has-non-embeddable-flags?]] if you need to check for this.Returns the flags for `re` as a `String`, 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 be silently dropped. Use [[has-non-embeddable-flags?]] if you need to check for this.
(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
.
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`.
(raw-str o)
clojure.core/str
but with better support for JavaScript's appalling RegExp
class.
Note:
`clojure.core/str` but with better support for JavaScript's appalling RegExp class. Note: * Ignores all flags in the regex.
(set-flags re flgs)
Sets the flags on re
to flgs
(a String
, or nil
to strip all flags),
returning a new regex. All existing flags in re
are replaced. Returns
nil
if re
is nil
. Throws if invalid flag characters are provided.
Sets the flags on `re` to `flgs` (a `String`, or `nil` to strip all flags), returning a new regex. All existing flags in `re` are replaced. Returns `nil` if `re` is `nil`. Throws if invalid flag characters are provided.
cljdoc builds & hosts documentation for Clojure/Script libraries
Ctrl+k | Jump to recent docs |
← | Move to previous article |
→ | Move to next article |
Ctrl+/ | Jump to the search field |