Liking cljdoc? Tell your friends :D

strojure.parsesso.char

Basic function for parsing sequences of characters.

Basic function for parsing sequences of characters.
raw docstring

isclj/s

(is s)
(is s pred-k)

Returns parser and predicate for the character c which is in the supplied string of characters s. Optional pred-k keyword refers to function (fn [pred-k s] (fn [c] ...)) which returns custom predicate for chars against s. The new pred-k should be registered using register-string-pred, predefined values are :default for default and :ic for case-insensitive matching.

(def control-char (char/is "EX"))

(def control-char-ignorecase (char/is "ex" :ic))
Returns parser and predicate for the character `c` which is in the supplied
string of characters `s`. Optional `pred-k` keyword refers to function
`(fn [pred-k s] (fn [c] ...))` which returns custom predicate for chars
against `s`. The new `pred-k` should be registered using
[[register-string-pred]], predefined values are `:default` for default and
`:ic` for case-insensitive matching.

    (def control-char (char/is "EX"))

    (def control-char-ignorecase (char/is "ex" :ic))
sourceraw docstring

is-notclj/s

(is-not s)
(is-not s pred-k)

Returns parser and predicate for the character c which is not in the supplied string of characters s. See also is about optional pred-k argument.

Returns parser and predicate for the character `c` which is _not_ in the
supplied string of characters `s`. See also [[is]] about optional
`pred-k` argument.
sourceraw docstring

letter-or-number?clj/s

Parser and predicate for ASCII 7 bit letter or number character.

Parser and predicate for ASCII 7 bit letter or number character.
sourceraw docstring

letter?clj/s

Parser and predicate for ASCII 7 bit letter character.

Parser and predicate for ASCII 7 bit letter character.
sourceraw docstring

lower?clj/s

Parser and predicate for ASCII 7 bit lower-case letter character.

Parser and predicate for ASCII 7 bit lower-case letter character.
sourceraw docstring

newlineclj/s

Parses a CRLF or LF end of line. Returns a \newline character.

Parses a CRLF or LF end of line. Returns a `\newline` character.
sourceraw docstring

number?clj/s

Parser and predicate for ASCII 7 bit number character.

Parser and predicate for ASCII 7 bit number character.
sourceraw docstring

regexclj/s

(regex re)

Returns parser and predicate for the character c matching regex pattern re.

Returns parser and predicate for the character `c` matching regex pattern
`re`.
sourceraw docstring

register-string-predclj/s

(register-string-pred k f)

Associates keyword k with predicate function of the is and is-not parsers.

Associates keyword `k` with predicate function of the [[is]] and
[[is-not]] parsers.
sourceraw docstring

str*clj/s

(str* x)

Builds string from (possibly nested) collections of parsed characters and strings. To be used with strojure.parsesso.parser/value.

Builds string from (possibly nested) collections of parsed characters and
strings. To be used with [[strojure.parsesso.parser/value]].
sourceraw docstring

upper?clj/s

Parser and predicate for ASCII 7 bit upper-case letter character.

Parser and predicate for ASCII 7 bit upper-case letter character.
sourceraw docstring

white?clj/s

Parser and predicate for ASCII 7 bit whitespace character.

Parser and predicate for ASCII 7 bit whitespace character.
sourceraw docstring

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

× close