cache for hara.string.base.path/make-pattern
cache for hara.string.base.path/make-pattern
(make-pattern s)
creates a regex pattern from a string
(path/make-pattern-raw ".") => (re-pattern ".")
creates a regex pattern from a string (path/make-pattern-raw ".") => (re-pattern "\.")
(make-pattern-raw s)
helper function for hara.string.base.path/make-pattern
helper function for hara.string.base.path/make-pattern
(path-count s)
(path-count s sep)
counts the number of elements in a given path
(path/path-count "a/b/c") => 3
(string/path-count ns) => 4
counts the number of elements in a given path (path/path-count "a/b/c") => 3 (string/path-count *ns*) => 4
(path-join arr)
(path-join arr sep)
joins a sequence of elements into a path separated value
(path/path-join ["a" "b" "c"]) => "a/b/c"
(string/path-join '[:a :b :c] "-") => :a-b-c
(string/path-join '[a b c] '-) => 'a-b-c
joins a sequence of elements into a path separated value (path/path-join ["a" "b" "c"]) => "a/b/c" (string/path-join '[:a :b :c] "-") => :a-b-c (string/path-join '[a b c] '-) => 'a-b-c
(path-ns s)
(path-ns s sep)
returns the path namespace of the string
(path/path-ns "a/b/c/d") => "a/b/c"
(string/path-ns :a.b.c ".") => :a.b
returns the path namespace of the string (path/path-ns "a/b/c/d") => "a/b/c" (string/path-ns :a.b.c ".") => :a.b
(path-ns-array s)
(path-ns-array s sep)
returns the path vector of the string
(path/path-ns-array "a/b/c/d") => ["a" "b" "c"]
(string/path-ns-array (keyword "a/b/c/d")) => [:a :b :c]
returns the path vector of the string (path/path-ns-array "a/b/c/d") => ["a" "b" "c"] (string/path-ns-array (keyword "a/b/c/d")) => [:a :b :c]
(path-nth s n)
(path-nth s n sep)
check for the val of the string
(path/path-nth "a/b/c/d" 2) => "c"
check for the val of the string (path/path-nth "a/b/c/d" 2) => "c"
(path-root s)
(path-root s sep)
returns the path root of the string
(path/path-root "a/b/c/d") => "a"
(string/path-root 'a.b.c ".") => 'a
returns the path root of the string (path/path-root "a/b/c/d") => "a" (string/path-root 'a.b.c ".") => 'a
(path-split s)
(path-split s sep)
splits a sequence of elements into a path separated value
(path/path-split "a/b/c/d") => '["a" "b" "c" "d"]
(path/path-split "a.b.c.d" ".") => ["a" "b" "c" "d"]
(string/path-split :hello/world) => [:hello :world]
(string/path-split :hello.world ".") => [:hello :world]
splits a sequence of elements into a path separated value (path/path-split "a/b/c/d") => '["a" "b" "c" "d"] (path/path-split "a.b.c.d" ".") => ["a" "b" "c" "d"] (string/path-split :hello/world) => [:hello :world] (string/path-split :hello.world ".") => [:hello :world]
(path-stem s)
(path-stem s sep)
returns the path stem of the string
(path/path-stem "a/b/c/d") => "b/c/d"
(string/path-stem 'a.b.c.d ".") => 'b.c.d
returns the path stem of the string (path/path-stem "a/b/c/d") => "b/c/d" (string/path-stem 'a.b.c.d ".") => 'b.c.d
(path-stem-array s)
(path-stem-array s sep)
returns the path stem vector of the string
(path/path-stem-array "a/b/c/d") => ["b" "c" "d"]
(string/path-stem-array 'a.b.c.d ".") => '[b c d]
returns the path stem vector of the string (path/path-stem-array "a/b/c/d") => ["b" "c" "d"] (string/path-stem-array 'a.b.c.d ".") => '[b c d]
(path-sub s start num)
(path-sub s start num sep)
returns a subsection of the path within the string
(path/path-sub "a/b/c/d" 1 2) => "b/c"
(string/path-sub (symbol "a/b/c/d") 1 2) => 'b/c
returns a subsection of the path within the string (path/path-sub "a/b/c/d" 1 2) => "b/c" (string/path-sub (symbol "a/b/c/d") 1 2) => 'b/c
(path-sub-array s start num)
(path-sub-array s start num sep)
returns a sub array of the path within the string
(path/path-sub-array "a/b/c/d" 1 2) => ["b" "c"]
(string/path-sub-array (symbol "a/b/c/d") 1 2) => '[b c]
returns a sub array of the path within the string (path/path-sub-array "a/b/c/d" 1 2) => ["b" "c"] (string/path-sub-array (symbol "a/b/c/d") 1 2) => '[b c]
(path-val s)
(path-val s sep)
returns the val of the string
(path/path-val "a/b/c/d") => "d"
(string/path-val 'a.b.c.d ".") => 'd
returns the val of the string (path/path-val "a/b/c/d") => "d" (string/path-val 'a.b.c.d ".") => 'd
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close