(all-files project path-type extension)
finds all files in the project given a context
(->> (all-files {:root (.getCanonicalPath (io/file "example"))} :root "md") (map #(.getName %))) => ["README.md"]
finds all files in the project given a context (->> (all-files {:root (.getCanonicalPath (io/file "example"))} :root "md") (map #(.getName %))) => ["README.md"]
(append-node zloc node)
Adds node as well as whitespace and newline on right
(-> (z/of-string "(+)") (z/down) (append-node 2) (append-node 1) (z/->root-string)) => "(+\n 1\n 2)"
Adds node as well as whitespace and newline on right (-> (z/of-string "(+)") (z/down) (append-node 2) (append-node 1) (z/->root-string)) => "(+\n 1\n 2)"
(escape-escapes s)
makes sure that newlines are printable
(escape-escapes "
")
=> "
"
makes sure that newlines are printable (escape-escapes "\ ") => "\ "
(escape-newlines s)
makes sure that newlines are printable
(escape-newlines "
")
=> "\n"
makes sure that newlines are printable (escape-newlines "\ ") => "\n"
(escape-quotes s)
makes sure that quotes are printable in string form
(escape-quotes ""hello"") => ""hello""
makes sure that quotes are printable in string form (escape-quotes "\"hello\"") => "\"hello\""
(has-quotes? s)
checks if a string has quotes
(has-quotes? ""hello"") => true
checks if a string has quotes (has-quotes? "\"hello\"") => true
(import-location zloc nsp gathered)
imports the meta information and docstring
imports the meta information and docstring
(nodes->docstring nodes)
converts nodes to a docstring compatible (->> (z/of-string ""hello"\n (+ 1 2)\n => 3 ") (iterate z/right*) (take-while identity) (map z/node) (nodes->docstring) (node/string)) => ""hello\n (+ 1 2)\n => 3 ""
(->> (z/of-string (str [\e \d])) (iterate z/right*) (take-while identity) (map z/node) (nodes->docstring) (str) (read-string)) => "[\e \d]"
converts nodes to a docstring compatible (->> (z/of-string "\"hello\"\n (+ 1 2)\n => 3 ") (iterate z/right*) (take-while identity) (map z/node) (nodes->docstring) (node/string)) => ""hello\n (+ 1 2)\n => 3 "" (->> (z/of-string (str [\e \d])) (iterate z/right*) (take-while identity) (map z/node) (nodes->docstring) (str) (read-string)) => "[\e \d]"
(strip-quotes s)
gets rid of quotes in a string
(strip-quotes ""hello"") => "hello"
gets rid of quotes in a string (strip-quotes "\"hello\"") => "hello"
(strip-quotes-array arr)
(strip-quotes-array [x & more] p1 p2 out)
utility that strips quotes when not the result of a fact (strip-quotes-array [""hello""]) => ["hello"]
(strip-quotes-array ["(str "hello")" " " "=>" " " ""hello""]) => ["(str "hello")" " " "=>" " " ""hello""]
utility that strips quotes when not the result of a fact (strip-quotes-array ["\"hello\""]) => ["hello"] (strip-quotes-array ["(str \"hello\")" " " "=>" " " "\"hello\""]) => ["(str \"hello\")" " " "=>" " " "\"hello\""]
(write-to-file zloc file)
exports the zipper contents to file
exports the zipper contents to file
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close