| 135 | |
| 136 | |
| 137 | static int str_upper (lua_State *L) { |
| 138 | size_t l; |
| 139 | size_t i; |
| 140 | luaL_Buffer b; |
| 141 | const char *s = luaL_checklstring(L, 1, &l); |
| 142 | char *p = luaL_buffinitsize(L, &b, l); |
| 143 | for (i=0; i<l; i++) |
| 144 | p[i] = toupper(uchar(s[i])); |
| 145 | luaL_pushresultsize(&b, l); |
| 146 | return 1; |
| 147 | } |
| 148 | |
| 149 | |
| 150 | static int str_rep (lua_State *L) { |
nothing calls this directly
no test coverage detected