MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / str_upper

Function str_upper

deps/lua/src/lstrlib.c:81–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79
80
81static int str_upper (lua_State *L) {
82 size_t l;
83 size_t i;
84 luaL_Buffer b;
85 const char *s = luaL_checklstring(L, 1, &l);
86 luaL_buffinit(L, &b);
87 for (i=0; i<l; i++)
88 luaL_addchar(&b, toupper(uchar(s[i])));
89 luaL_pushresult(&b);
90 return 1;
91}
92
93static int str_rep (lua_State *L) {
94 size_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