| 13743 | |
| 13744 | |
| 13745 | static int str_lower (lua_State *L) { |
| 13746 | size_t l; |
| 13747 | size_t i; |
| 13748 | luaL_Buffer b; |
| 13749 | const char *s = luaL_checklstring(L, 1, &l); |
| 13750 | luaL_buffinit(L, &b); |
| 13751 | for (i=0; i<l; i++) |
| 13752 | luaL_addchar(&b, tolower(uchar(s[i]))); |
| 13753 | luaL_pushresult(&b); |
| 13754 | return 1; |
| 13755 | } |
| 13756 | |
| 13757 | |
| 13758 | static int str_upper (lua_State *L) { |
nothing calls this directly
no test coverage detected