(add-child container elem)
adds a child to a container block
(-> (block []) (add-child 1) (add-child 2) (str)) => "[12]"
adds a child to a container block (-> (block []) (add-child 1) (add-child 2) (str)) => "[12]"
(block elem)
creates a block
(base/block-info (block 1)) => {:type :token, :tag :long, :string "1", :height 0, :width 1}
(str (block [1 (newline) (void) 2])) => "[1\n 2]"
creates a block (base/block-info (block 1)) => {:type :token, :tag :long, :string "1", :height 0, :width 1} (str (block [1 (newline) (void) 2])) => "[1\n 2]"
(comment s)
creates a comment block
(str (comment ";hello")) => ";hello"
creates a comment block (str (comment ";hello")) => ";hello"
(construct-children form)
constructs the children
(mapv str (construct-children [1 (newline) (void) 2]))
=> ["1" "
" "␣" "2"]
constructs the children (mapv str (construct-children [1 (newline) (void) 2])) => ["1" "\ " "␣" "2"]
constructs a collection
(str (construct-collection [1 2 (void) (void) 3])) => "[1 2 3]"
constructs a collection (str (construct-collection [1 2 (void) (void) 3])) => "[1 2 3]"
(container tag children)
creates a container
(str (container :list [(void) (void)])) => "( )"
creates a container (str (container :list [(void) (void)])) => "( )"
(container-checks tag children props)
performs checks for the container
performs checks for the container
(contents block)
reads out the contents of a container
(contents (block [1 2 3])) => '[1 ␣ 2 ␣ 3]
reads out the contents of a container (contents (block [1 2 3])) => '[1 ␣ 2 ␣ 3]
(cursor)
creates a cursor for the navigator
(str (cursor)) => "|"
creates a cursor for the navigator (str (cursor)) => "|"
(empty)
constructs empty list
(str (empty)) => "()"
constructs empty list (str (empty)) => "()"
(newline)
creates a newline
(str (newline))
=> "
"
creates a newline (str (newline)) => "\ "
(newlines n)
creates multiple newlines
(apply str (newlines 5))
=> "
"
creates multiple newlines (apply str (newlines 5)) => "\ \ \ \ \ "
(root children)
constructs a root block
(str (root '[a b])) => "a b"
constructs a root block (str (root '[a b])) => "a b"
(space)
creates a space block
(str (space)) => "␣"
creates a space block (str (space)) => "␣"
(spaces n)
creates multiple space blocks
(apply str (spaces 5)) => "␣␣␣␣␣"
creates multiple space blocks (apply str (spaces 5)) => "␣␣␣␣␣"
(string-token form)
constructs a string token
(str (string-token "hello")) => ""hello""
(str (string-token "hello\nworld"))
=> ""hello
world""
constructs a string token (str (string-token "hello")) => "\"hello\"" (str (string-token "hello\nworld")) => "\"hello\ world\""
(tabs n)
creates multiple tabs
(apply str (tabs 5)) => "\ \ \ \ \ "
creates multiple tabs (apply str (tabs 5)) => "\ \ \ \ \ "
(token form)
creates a token
(str (token 'abc)) => "abc"
creates a token (str (token 'abc)) => "abc"
(token-dimensions tag string)
returns the dimensions of the token
(token-dimensions :regexp "#"hello
world"")
=> [15 0]
(token-dimensions :regexp "#"hello\nworld"") => [6 1]
returns the dimensions of the token (token-dimensions :regexp "#\"hello\ world\"") => [15 0] (token-dimensions :regexp "#\"hello\nworld\"") => [6 1]
(token-from-string string)
(token-from-string string value value-string)
creates a token from a string input
(str (token-from-string "abc")) => "abc"
creates a token from a string input (str (token-from-string "abc")) => "abc"
(uneval)
creates a hash-uneval block
(str (uneval)) => "#_"
creates a hash-uneval block (str (uneval)) => "#_"
(void)
(void ch)
creates a void block
(str (void)) => "␣"
creates a void block (str (void)) => "␣"
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close