cfunction
(string/format format & values)
Similar to snprintf, but specialized for operating with Janet values.
Returns a new string.
# There is a list of formatters here: https://janet-lang.org/capi/writing-c-functions.html
(string/format "With terminal colors: %M" [:array {:key-in "struct"}]) # => "With terminal colors: (\e[33m:array\e[0m {\e[33m:key-in\e[0m \e[35m\"struct\"\e[0m})"
You can see janet datastructure values by typing:
(string/format "%q" {:a 1 :b 2}) # => {:a 1 :b 2}