| 34 | |
| 35 | |
| 36 | static ptrdiff_t posrelat (ptrdiff_t pos, size_t len) { |
| 37 | /* relative string position: negative means back from end */ |
| 38 | if (pos < 0) pos += (ptrdiff_t)len + 1; |
| 39 | return (pos >= 0) ? pos : 0; |
| 40 | } |
| 41 | |
| 42 | |
| 43 | static int str_sub (lua_State *L) { |
no outgoing calls
no test coverage detected