Skip to content

clojure.core/format

View this page on ClojureDocs

Type: function Added: Clojure 1.0 Examples: 6 Runnable: 2
([fmt & args])

Formats a string using java.lang.String.format, see java.util.Formatter for format string syntax

Examples

by Jacolyte on
by jafingerhut on . May have evaluation errors.
by jafingerhut on . May have evaluation errors.
by mars0i on . May have evaluation errors.
by andreasguther on
by Kynde on . May have evaluation errors.

Note by timgilbert

Note that (format) is not currently supported in ClojureScript, only in Clojure.

Note by PEZ

For ClojureScript there is https://github.com/quoll/clormat. As of this writing it is new and because of that maybe not always fully compliant. Afaiu the goal is to make it fully compliant.

Note by grav

There's also Google Closure's format for ClojureScript. Example usage.

See also


Content from the matching ClojureDocs page, with authors credited on each contribution.