MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / str_lower

Function str_lower

extlibs/lua/src/lstrlib.c:124–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122
123
124static int str_lower (lua_State *L) {
125 size_t l;
126 size_t i;
127 luaL_Buffer b;
128 const char *s = luaL_checklstring(L, 1, &l);
129 char *p = luaL_buffinitsize(L, &b, l);
130 for (i=0; i<l; i++)
131 p[i] = tolower(uchar(s[i]));
132 luaL_pushresultsize(&b, l);
133 return 1;
134}
135
136
137static int str_upper (lua_State *L) {

Callers

nothing calls this directly

Calls 3

luaL_checklstringFunction · 0.85
luaL_buffinitsizeFunction · 0.85
luaL_pushresultsizeFunction · 0.85

Tested by

no test coverage detected