(collapse-whitespace-and-index s)
given a string argument s
it will return a vector of two values:
s
, call it s'given a string argument `s` it will return a vector of two values: - a modified version of `s`, call it s' - a vector of indexes, v s' will be a copy of s in which all consecutive whitespace is collapsed to one whitespace v will be a vector of index for characters in s' back to the original s For example: (collapse-whitespace-and-index "a b c") will return ["a b c" [0 1 2 3 5]] ;; notice that the 4 is not there
(find-bounds form-str search-str num-seen)
Try and find the bounds of the form we are searching for. Uses some heuristics to try and avoid matching partial forms, e.g. 'default-|weeks| for the form 'weeks.
Try and find the bounds of the form we are searching for. Uses some heuristics to try and avoid matching partial forms, e.g. 'default-|weeks| for the form 'weeks.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close