str_len
function · lua · boundary
- Address
0x7fbcf0· 62 bytes, up to0x7fbd2d- Signature
int __fastcall (lua_State *L)- Meaning
- Pushes the length of a string
- Confidence
- verified, proof one
- Finding
- lua/libs#string-basics
Finding: String basics in lua: the libraries
Six string functions are plain: len, sub (indices from either end through posrelat, the
last index defaulting to -1), rep (a count of copies), byte (the code at one position,
default 1, one result), char (a string from codes, invalid value above 255) and dump (a Lua
function with no upvalues as a string through lua_dump). posrelat turns a negative position
into one counted from the end, and writer is the callback lua_dump calls.
| function | name | decided by |
|---|---|---|
0x7fbcf0 | str_len | luaL_checklstring (0x7fbd02), the length pushed (0x7fbd1f) |
0x7fbd30 | str_sub | posrelat twice (0x7fbd5f, 0x7fbd83), default -1 for the end, lua_pushlstring (0x7fbda9) |
0x7fbde0 | posrelat | a negative position gets len + 1 added; the body is 11 bytes (0x7fbde0) |
0x7fc1a0 | str_rep | luaL_buffinit (0x7fc1d9), luaL_addlstring per copy (0x7fc1ee), luaL_pushresult (0x7fc1fc) |
0x7fc210 | str_byte | luaL_optnumber (0x7fc238), posrelat (0x7fc247), one lua_pushnumber (0x7fc267) |
0x7fc280 | str_char | lua_gettop loop, value tested against 255, invalid value (0x7fc2c8), luaL_argerror (0x7fc2d1) |
0x7fc330 | str_dump | luaL_checktype 6 (0x7fc343), lua_dump (0x7fc363), unable to dump given function (0x7fc36c) |
0x7fc390 | writer | luaL_addlstring (0x7fc39a) |
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 2
- lua_pushnumber lua
- luaL_checklstring lua
Calls and jumps by a bare address, from tables/calls.tsv.