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