MCPcopy Create free account
hub / github.com/F-Stack/f-stack / str_lower

Function str_lower

freebsd/contrib/openzfs/module/lua/lstrlib.c:89–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87
88
89static int str_lower (lua_State *L) {
90 size_t l;
91 size_t i;
92 luaL_Buffer b;
93 const char *s = luaL_checklstring(L, 1, &l);
94 char *p = luaL_buffinitsize(L, &b, l);
95 for (i=0; i<l; i++)
96 p[i] = tolower(uchar(s[i]));
97 luaL_pushresultsize(&b, l);
98 return 1;
99}
100
101
102static int str_upper (lua_State *L) {

Callers

nothing calls this directly

Calls 4

luaL_buffinitsizeFunction · 0.85
tolowerFunction · 0.85
luaL_pushresultsizeFunction · 0.85
luaL_checklstringFunction · 0.70

Tested by

no test coverage detected