MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / str_upper

Function str_upper

libraries/AP_Scripting/lua/src/lstrlib.c:116–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114
115
116static int str_upper (lua_State *L) {
117 size_t l;
118 size_t i;
119 luaL_Buffer b;
120 const char *s = luaL_checklstring(L, 1, &l);
121 char *p = luaL_buffinitsize(L, &b, l);
122 for (i=0; i<l; i++)
123 p[i] = toupper(uchar(s[i]));
124 luaL_pushresultsize(&b, l);
125 return 1;
126}
127
128
129static 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