Lua 5.5 variadic formatting
Lua 5.5


Declare the anonymous arguments needed by a format string:
USING: alien.c-types alien.syntax io.encodings.ascii lua ; LIBRARY: liblua5.5 FUNCTION-ALIAS: lua-push-message c-string[ascii] lua_pushfstring ( lua_State* L, c-string[ascii] fmt, ... c-string[ascii] name, int count ) ! Given a live Lua state on the stack: "%s: %d" "items" 3 lua-push-message

The call returns a Factor string and leaves the corresponding Lua string on the Lua stack. Manage the Lua stack using the usual Lua API. The ordinary lua_pushfstring declaration can format a literal or %% without anonymous arguments.
lua_pushfstring ( L fmt -- c-string )

lua_pushvfstring ( L fmt argp -- c-string )

luaL_error ( L fmt -- int )


These are Lua 5.5 formats, not the complete printf format language.https://www.lua.org/manual/5.5/manual.html#lua_pushfstring