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