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

Function str_lower

deps/lua/src/lstrlib.c:68–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66
67
68static int str_lower (lua_State *L) {
69 size_t l;
70 size_t i;
71 luaL_Buffer b;
72 const char *s = luaL_checklstring(L, 1, &l);
73 luaL_buffinit(L, &b);
74 for (i=0; i<l; i++)
75 luaL_addchar(&b, tolower(uchar(s[i])));
76 luaL_pushresult(&b);
77 return 1;
78}
79
80
81static int str_upper (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