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

Function str_upper

third-party/lua-5.2.4/src/lstrlib.c:92–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90
91
92static int str_upper (lua_State *L) {
93 size_t l;
94 size_t i;
95 luaL_Buffer b;
96 const char *s = luaL_checklstring(L, 1, &l);
97 char *p = luaL_buffinitsize(L, &b, l);
98 for (i=0; i<l; i++)
99 p[i] = toupper(uchar(s[i]));
100 luaL_pushresultsize(&b, l);
101 return 1;
102}
103
104
105/* reasonable limit to avoid arithmetic overflow */

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