MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / str_upper

Function str_upper

src/Chain/libraries/glua/lstrlib.cpp:108–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106
107
108static int str_upper(lua_State *L) {
109 size_t l;
110 size_t i;
111 luaL_Buffer b;
112 const char *s = luaL_checklstring(L, 1, &l);
113 char *p = luaL_buffinitsize(L, &b, l);
114 for (i = 0; i < l; i++)
115 p[i] = toupper(uchar(s[i]));
116 luaL_pushresultsize(&b, l);
117 return 1;
118}
119
120
121static int str_rep(lua_State *L) {

Callers

nothing calls this directly

Calls 4

luaL_checklstringFunction · 0.85
luaL_buffinitsizeFunction · 0.85
toupperFunction · 0.85
luaL_pushresultsizeFunction · 0.85

Tested by

no test coverage detected