| 107 | |
| 108 | |
| 109 | static int str_upper (lua_State *L) { |
| 110 | size_t l; |
| 111 | size_t i; |
| 112 | luaL_Buffer b; |
| 113 | const char *s = luaL_checklstring(L, 1, &l); |
| 114 | char *p = luaL_buffinitsize(L, &b, l); |
| 115 | for (i=0; i<l; i++) |
| 116 | p[i] = toupper(uchar(s[i])); |
| 117 | luaL_pushresultsize(&b, l); |
| 118 | return 1; |
| 119 | } |
| 120 | |
| 121 | |
| 122 | static int str_rep (lua_State *L) { |
nothing calls this directly
no test coverage detected