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

Function str_upper

extlibs/lua/src/lstrlib.c:137–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135
136
137static int str_upper (lua_State *L) {
138 size_t l;
139 size_t i;
140 luaL_Buffer b;
141 const char *s = luaL_checklstring(L, 1, &l);
142 char *p = luaL_buffinitsize(L, &b, l);
143 for (i=0; i<l; i++)
144 p[i] = toupper(uchar(s[i]));
145 luaL_pushresultsize(&b, l);
146 return 1;
147}
148
149
150static int str_rep (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