MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / str_reverse

Function str_reverse

deps/lua/src/lstrlib.c:57–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55
56
57static int str_reverse (lua_State *L) {
58 size_t l;
59 luaL_Buffer b;
60 const char *s = luaL_checklstring(L, 1, &l);
61 luaL_buffinit(L, &b);
62 while (l--) luaL_addchar(&b, s[l]);
63 luaL_pushresult(&b);
64 return 1;
65}
66
67
68static int str_lower (lua_State *L) {

Callers

nothing calls this directly

Calls 3

luaL_checklstringFunction · 0.85
luaL_buffinitFunction · 0.85
luaL_pushresultFunction · 0.85

Tested by

no test coverage detected