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

Function str_reverse

third-party/lua-5.2.4/src/lstrlib.c:67–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65
66
67static int str_reverse (lua_State *L) {
68 size_t l, i;
69 luaL_Buffer b;
70 const char *s = luaL_checklstring(L, 1, &l);
71 char *p = luaL_buffinitsize(L, &b, l);
72 for (i = 0; i < l; i++)
73 p[i] = s[l - i - 1];
74 luaL_pushresultsize(&b, l);
75 return 1;
76}
77
78
79static 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