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

Function str_lower

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

Source from the content-addressed store, hash-verified

101
102
103static int str_lower (lua_State *L) {
104 size_t l;
105 size_t i;
106 luaL_Buffer b;
107 const char *s = luaL_checklstring(L, 1, &l);
108 char *p = luaL_buffinitsize(L, &b, l);
109 for (i=0; i<l; i++)
110 p[i] = tolower(uchar(s[i]));
111 luaL_pushresultsize(&b, l);
112 return 1;
113}
114
115
116static int str_upper (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