Liking cljdoc? Tell your friends :D

clj-pnm.core

'clj-pnm' core functions namespace.

'clj-pnm' core functions namespace.
raw docstring

blank?clj/s

(blank? s)

Returns true if the string is either nil, empty or contains only whitespace.

Returns true if the string is either nil, empty or contains only whitespace.
sourceraw docstring

comment-line?clj/s

(comment-line? line)

Returns true if a string is considered a Netpbm format comment line (starts with '#' character). Otherwise returns false.

Returns true if a string is considered a Netpbm format comment line (starts with '#' character).
Otherwise returns false.
sourceraw docstring

fourthclj/s

(fourth v)

Returns the fourth element of the collection.

Returns the fourth element of the collection.
sourceraw docstring

get-commentsclj/s

(get-comments v)

Returns all the Netpbm comments lines from the collection of strings.

Returns all the Netpbm comments lines from the collection of strings.
sourceraw docstring

normalize-whitespaceclj/s

(normalize-whitespace v)

Goes through the collection of strings and reduces multiple white-spaces in a string to just one and trims it.

Goes through the collection of strings and reduces multiple white-spaces
in a string to just one and trims it.
sourceraw docstring

parseclj/smultimethod

Parses the vector of Netpbm lines to a map. Supports 'pbm', 'pgm' and 'ppm' formats. Throws an Exception or JS error if format is unsupported.

Parses the vector of Netpbm lines to a map. Supports 'pbm', 'pgm'
and 'ppm' formats. Throws an Exception or JS error if format is unsupported.
sourceraw docstring

read-linesclj/smultimethod

Reads string lines for the given source. In Clojure environments the function supports string and file sources and in ClojureScript environment only string sources.

Reads string lines for the given source. In Clojure environments the
function supports string and file sources and in ClojureScript environment
only string sources.
sourceraw docstring

read-pnmclj/s

(read-pnm pnm)

Main function for reading Netpbm format. Accepts the string or a file and returns a Netpbm map representation.

Main function for reading Netpbm format. Accepts the string or a file
and returns a Netpbm map representation.
sourceraw docstring

read-strclj/s

(read-str s)

Reads the object from the string. In Clojure environment uses 'read-string' and in ClojureScript environment uses 'cljs.reader/read-string'.

Reads the object from the string. In Clojure environment uses 'read-string'
and in ClojureScript environment uses 'cljs.reader/read-string'.
sourceraw docstring

remove-commentsclj/s

(remove-comments v)

Removes all the Netpbm comment lines from the collection of strings.

Removes all the Netpbm comment lines from the collection of strings.
sourceraw docstring

split-on-space-charclj/s

(split-on-space-char s)

Splits the given string on space character returning a vector of the parts.

Splits the given string on space character returning a vector of the parts.
sourceraw docstring

thirdclj/s

(third v)

Returns the third element of the collection.

Returns the third element of the collection.
sourceraw docstring

tokenizeclj/s

(tokenize v)

Tokenizes a collection of strings by splitting each one on space character and flattening the resulting collection.

Tokenizes a collection of strings by splitting each one on space character
and flattening the resulting collection.
sourceraw docstring

write-commentsclj

(write-comments writer comments)

Writes a comment line to a Writer. Prepends the '# ' sequence to the string. The function is exposed only in Clojure environment.

Writes a comment line to a Writer. Prepends the '# ' sequence to the string.
The function is exposed only in Clojure environment.
sourceraw docstring

write-mapclj

(write-map writer m)

Writes the Netpbm bit/value map to a Writer. The function is exposed only in Clojure environment.

Writes the Netpbm bit/value map to a Writer. The function is exposed only in Clojure environment.
sourceraw docstring

write-pnmclj

(write-pnm pnm file-name)
(write-pnm pnm file-name comments)

The main function for writing Netpbm format to a file. Accepts a Netpbm map representation and a file name. Can optionally accept a set of comments that will be written in a file after the header. The function is exposed only in Clojure environment.

The main function for writing Netpbm format to a file. Accepts a Netpbm map representation and a
file name. Can optionally accept a set of comments that will be written in a file after the header.
The function is exposed only in Clojure environment.
sourceraw docstring

writelnclj

(writeln writer line)

Writes a string to a Writer. Appends a newline character to a string first. The function is exposed only in Clojure environment.

Writes a string to a Writer. Appends a newline character to a string first.
The function is exposed only in Clojure environment.
sourceraw docstring

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

× close