MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / str_upper

Function str_upper

third-party/lua-5.5.0/src/lstrlib.c:122–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

luaL_checklstringFunction · 0.70
luaL_buffinitsizeFunction · 0.70
luaL_pushresultsizeFunction · 0.70

Tested by

no test coverage detected