I am trying to format the color in hexadecimal format for use in HTML using ClojureScript in a browser.
Here is my "format" function.
(defn gen-format [& args] (apply gstring/format args) )
in the "string" namespace, where I need a goog.string library with:
(:require [goog.string :as gstring] [goog.string.format :as gformat])
But when I try to call it from javascript:
document.write(mypackage.strings.gen_format("#%x%x%x",0,0,0));
he just returns #%x%x%x
This is not a failure. But the goog format function does not seem to substitute values. Am I doing something wrong here?
source
share