Closed vadi2 closed 4 years ago
Possible typo in readme, because utf8.remove needs second argument https://github.com/starwing/luautf8/blob/master/lutf8lib.c#L497 If replace this line with
luaL_optinteger(L, 2, 1), luaL_optinteger(L, 3, -1)))
it works as intended by readme. If start position should be required argument, then readme should be fixed to point it out.
Good catch! Thanks for report. I'm busy for work recently. But I will look into this as soon as possible.
utf8.remove(s[, start[, stop]]) -> new_string
delete a substring in s. If neither start nor stop is given, delete the last UTF-8 char in s