| 114 | |
| 115 | |
| 116 | static int str_upper (lua_State *L) { |
| 117 | size_t l; |
| 118 | size_t i; |
| 119 | luaL_Buffer b; |
| 120 | const char *s = luaL_checklstring(L, 1, &l); |
| 121 | char *p = luaL_buffinitsize(L, &b, l); |
| 122 | for (i=0; i<l; i++) |
| 123 | p[i] = toupper(uchar(s[i])); |
| 124 | luaL_pushresultsize(&b, l); |
| 125 | return 1; |
| 126 | } |
| 127 | |
| 128 | |
| 129 | static int str_rep (lua_State *L) { |
nothing calls this directly
no test coverage detected