| 79 | |
| 80 | |
| 81 | static 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 | |
| 93 | static int str_rep (lua_State *L) { |
| 94 | size_t l; |
nothing calls this directly
no test coverage detected