| 66 | |
| 67 | |
| 68 | static int str_lower (lua_State *L) { |
| 69 | size_t l; |
| 70 | size_t i; |
| 71 | luaL_Buffer b; |
| 72 | const char *s = luaL_checklstring(L, 1, &l); |
| 73 | luaL_buffinit(L, &b); |
| 74 | for (i=0; i<l; i++) |
| 75 | luaL_addchar(&b, tolower(uchar(s[i]))); |
| 76 | luaL_pushresult(&b); |
| 77 | return 1; |
| 78 | } |
| 79 | |
| 80 | |
| 81 | static int str_upper (lua_State *L) { |
nothing calls this directly
no test coverage detected