MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / str_upper

Function str_upper

Source/Misc/lua/src/lua.c:13758–13768  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13756
13757
13758static int str_upper (lua_State *L) {
13759size_t l;
13760size_t i;
13761luaL_Buffer b;
13762const char *s = luaL_checklstring(L, 1, &l);
13763luaL_buffinit(L, &b);
13764for (i=0; i<l; i++)
13765luaL_addchar(&b, toupper(uchar(s[i])));
13766luaL_pushresult(&b);
13767return 1;
13768}
13769
13770static int str_rep (lua_State *L) {
13771size_t l;

Callers

nothing calls this directly

Calls 3

luaL_checklstringFunction · 0.85
luaL_buffinitFunction · 0.85
luaL_pushresultFunction · 0.85

Tested by

no test coverage detected