Liking cljdoc? Tell your friends :D
Clojure only.

multigrep.core


grepcljmultimethod

(grep r f)

Returns a sequence of maps representing each of the matches of r (one or more regexes) in f (one or more things that can be read by clojure.io/reader).

Each map in the sequence has these keys: { :file ; the entry in f that matched :line ; text of the line that matched :line-number ; line-number of that line (note: 1 based) :regex ; the entry in r that matched :re-seq ; the output from re-seq for this line and this regex }

Returns a sequence of maps representing each of the matches of r (one or more regexes) in f (one or more things that can be read by clojure.io/reader).

Each map in the sequence has these keys:
  {
    :file         ; the entry in f that matched
    :line         ; text of the line that matched
    :line-number  ; line-number of that line (note: 1 based)
    :regex        ; the entry in r that matched
    :re-seq       ; the output from re-seq for this line and this regex
  }
sourceraw docstring

greplace!cljmultimethod

(greplace! r s f)
(greplace! r s f in-memory-threshold)

Applies r (a single regex) to f (one or more things that can be read by clojure.io/reader), substituting s (a string, or a function of one parameter (the match(es) from the regex) returning a string).

Returns a sequence of maps representing each of the substitutions. Each map in the sequence has these keys: { :file ; the entry in f that matched :line-number ; line-number of the line that had one or more substitutions (note: 1 based) }

The optional fourth parameter specifies at what file size processing should switch from in-memory to on-disk. It defaults to 1MB.

Applies r (a single regex) to f (one or more things that can be read by clojure.io/reader), substituting s (a string, or a function of one parameter (the match(es) from the regex) returning a string).

Returns a sequence of maps representing each of the substitutions.  Each map in the sequence has these keys:
  {
    :file         ; the entry in f that matched
    :line-number  ; line-number of the line that had one or more substitutions (note: 1 based)
  }

The optional fourth parameter specifies at what file size processing should switch from in-memory to on-disk.  It defaults to 1MB.
sourceraw docstring

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

× close