str_format
function · lua · boundary
- Address
0x7fd3d0· 691 bytes, up to0x7fd682- 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$).
| function | name | decided by |
|---|---|---|
0x7fd3d0 | str_format | the pattern (0x7fd4dd), match (0x7fd4fa), width and precision tests against 2 (0x7fd50c, 0x7fd510), spec length limit 18 (0x7fd51c), switch on the letter (0x7fd54f), sprintf (0x7fd586) |
0x7fd6d0 | luaI_addquoted | quote (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
- __ftol crt
- _strncpy crt
- __isctype crt
- lua_pushvalue lua
- luaL_error lua
- luaL_checklstring lua
- luaL_checknumber lua
- luaL_prepbuffer lua
- luaL_addlstring lua
- luaL_pushresult lua
- luaL_addvalue lua
- luaL_buffinit lua
- _sprintf crt
- match lua
- luaI_addquoted lua
Calls and jumps by a bare address, from tables/calls.tsv.