Liking cljdoc? Tell your friends :D

std.block.construct


*container-props*clj


*tags*clj


+formfeed+clj


+newline+clj


+return+clj


+space+clj


add-childclj

(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]"
raw docstring

blockclj

(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]"
raw docstring

commentclj

(comment s)

creates a comment block

(str (comment ";hello")) => ";hello"

creates a comment block

(str (comment ";hello"))
=> ";hello"
raw docstring

construct-childrenclj

(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"]
raw docstring

construct-collectioncljmultimethod

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]"
raw docstring

containerclj

(container tag children)

creates a container

(str (container :list [(void) (void)])) => "( )"

creates a container

(str (container :list [(void) (void)]))
=> "(  )"
raw docstring

container-checksclj

(container-checks tag children props)

performs checks for the container

performs checks for the container
raw docstring

contentsclj

(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]
raw docstring

cursorclj

(cursor)

creates a cursor for the navigator

(str (cursor)) => "|"

creates a cursor for the navigator

(str (cursor))
=> "|"
raw docstring

emptyclj

(empty)

constructs empty list

(str (empty)) => "()"

constructs empty list

(str (empty))
=> "()"
raw docstring

newlineclj

(newline)

creates a newline

(str (newline)) => "
"

creates a newline
 
   (str (newline))
   => "\
"
raw docstring

newlinesclj

(newlines n)

creates multiple newlines

(apply str (newlines 5)) => "




"

creates multiple newlines
 
   (apply str (newlines 5))
   => "\
\
\
\
\
"
raw docstring

rootclj

(root children)

constructs a root block

(str (root '[a b])) => "a b"

constructs a root block

(str (root '[a b]))
=> "a b"
raw docstring

spaceclj

(space)

creates a space block

(str (space)) => "␣"

creates a space block

(str (space))
=> "␣"
raw docstring

spacesclj

(spaces n)

creates multiple space blocks

(apply str (spaces 5)) => "␣␣␣␣␣"

creates multiple space blocks

(apply str (spaces 5))
=> "␣␣␣␣␣"
raw docstring

string-tokenclj

(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\""
raw docstring

tabclj

(tab)

creates a tab

(str (tab)) => "\ "

creates a tab

(str (tab))
=> "\	"
raw docstring

tabsclj

(tabs n)

creates multiple tabs

(apply str (tabs 5)) => "\ \ \ \ \ "

creates multiple tabs

(apply str (tabs 5))
=> "\	\	\	\	\	"
raw docstring

tokenclj

(token form)

creates a token

(str (token 'abc)) => "abc"

creates a token

(str (token 'abc))
=> "abc"
raw docstring

token-dimensionsclj

(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]
raw docstring

token-from-stringclj

(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"
raw docstring

unevalclj

(uneval)

creates a hash-uneval block

(str (uneval)) => "#_"

creates a hash-uneval block

(str (uneval))
=> "#_"
raw docstring

voidclj

(void)
(void ch)

creates a void block

(str (void)) => "␣"

creates a void block

(str (void))
=> "␣"
raw docstring

void-lookupclj

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

× close