MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / str_lower

Function str_lower

src/Chain/libraries/glua/lstrlib.cpp:95–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93
94
95static int str_lower(lua_State *L) {
96 size_t l;
97 size_t i;
98 luaL_Buffer b;
99 const char *s = luaL_checklstring(L, 1, &l);
100 char *p = luaL_buffinitsize(L, &b, l);
101 for (i = 0; i < l; i++)
102 p[i] = tolower(uchar(s[i]));
103 luaL_pushresultsize(&b, l);
104 return 1;
105}
106
107
108static int str_upper(lua_State *L) {

Callers

nothing calls this directly

Calls 4

luaL_checklstringFunction · 0.85
luaL_buffinitsizeFunction · 0.85
luaL_pushresultsizeFunction · 0.85
tolowerFunction · 0.50

Tested by

no test coverage detected