format ( formatstr text [, formatarg "any" [, ...] ] ) → textFormats arguments according to a format string; see Section 9.4.1. This function is similar to the C function
sprintf.format('Hello %s, %1$s', 'World') → Hello World, WorldFormats arguments according to a format string; see Section 9.4.1.
format ( formatstr text [, formatarg "any" [, ...] ] ) → textFormats arguments according to a format string; see Section 9.4.1. This function is similar to the C function
sprintf.format('Hello %s, %1$s', 'World') → Hello World, Worldformat(formatstr text [, formatarg "any" [, ...] ])
formatstr is a format string that specifies how the result should be formatted. Text in the format string is copied directly to the result, except where format specifiers are used. Format specifiers act as placeholders in the string, defining how subsequent function arguments should be formatted and inserted into the result. Each formatarg argument is converted to text according to the usual output rules for its data type, and then formatted and inserted into the result string according to the format specifier(s).Definition snapshot: 2026-09-14T13:14:25.684213+00:00@99e6866c · English manual source