benilla-re systems structs docs

str_format

function · lua · boundary

Address
0x7fd3d0 · 691 bytes, up to 0x7fd682
Signature
int __fastcall (lua_State *L)
Meaning
Pushes a string formatted from a format and arguments, as C sprintf with the Lua conversions
Confidence
verified, proof one
Finding
lua/libs#formatting

Finding: Formatting in lua: the libraries

str_format walks its format string, copies text and %%, and for each % conversion scans the specification with the matcher and the pattern [-+ #0]*(%d*)%.?(%d*), raising when a width or precision has more than two digits. The conversion letter selects sprintf with a double (e E f g G), an integer (c d i o u x X), the quoted form (q, luaI_addquoted), or a string (s; long strings without precision go in whole). An argument may be numbered (%n$).

functionnamedecided by
0x7fd3d0str_formatthe pattern (0x7fd4dd), match (0x7fd4fa), width and precision tests against 2 (0x7fd50c, 0x7fd510), spec length limit 18 (0x7fd51c), switch on the letter (0x7fd54f), sprintf (0x7fd586)
0x7fd6d0luaI_addquotedquote (0x7fd716), the escapes, the text \000 through luaL_addlstring (0x7fd75c)

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 15

Calls and jumps by a bare address, from tables/calls.tsv.