MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / str_reverse

Function str_reverse

third-party/lua-5.4.6/src/lstrlib.c:112–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110
111
112static int str_reverse (lua_State *L) {
113 size_t l, i;
114 luaL_Buffer b;
115 const char *s = luaL_checklstring(L, 1, &l);
116 char *p = luaL_buffinitsize(L, &b, l);
117 for (i = 0; i < l; i++)
118 p[i] = s[l - i - 1];
119 luaL_pushresultsize(&b, l);
120 return 1;
121}
122
123
124static int str_lower (lua_State *L) {

Callers

nothing calls this directly

Calls 3

luaL_checklstringFunction · 0.70
luaL_buffinitsizeFunction · 0.70
luaL_pushresultsizeFunction · 0.70

Tested by

no test coverage detected