This experimental reader is created for stream support.
It takes a Reader
as input and implements a CharSequence
, based
on an internal buffer. It will fill its buffer on demand.
Support for matching a literal substring or a regular expression
pattern has been implemented on top of this, via the MatchSupport
protocol. Part of the internal buffer can be released by a cut
operation, via the CutSupport
protocol.
The MatchSupport
protocol has been implemented for a normal String
as well.
This experimental reader is created for stream support. It takes a `Reader` as input and implements a `CharSequence`, based on an internal buffer. It will fill its buffer on demand. Support for matching a literal substring or a regular expression pattern has been implemented on top of this, via the `MatchSupport` protocol. Part of the internal buffer can be released by a cut operation, via the `CutSupport` protocol. The `MatchSupport` protocol has been implemented for a normal String as well.
(cut this index)
Indicate that no data before index
will be requested anymore,
so those resources can be released.
Indicate that no data before `index` will be requested anymore, so those resources can be released.
(match-literal this index string)
Try to match the given string
literal on index
. Returns a
success node, or nil.
Try to match the given `string` literal on `index`. Returns a success node, or nil.
(match-pattern this index pattern)
Try to match the given regular expression pattern
on index
.
Returns a success node, or nil.
Try to match the given regular expression `pattern` on `index`. Returns a success node, or nil.
(reader? obj)
Returns true if obj
is a java Reader
.
Returns true if `obj` is a java `Reader`.
(wrap-reader reader chunk-size)
Wrap a Reader
to create a buffering CharSequence
implementation
which satisfies MatchSupport
and CutSupport
protocols. This
makes it suitable as input for the core/parse
function.
Wrap a `Reader` to create a buffering `CharSequence` implementation which satisfies `MatchSupport` and `CutSupport` protocols. This makes it suitable as input for the `core/parse` function.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close