starwing / luautf8

a utf-8 support module for Lua and LuaJIT.
MIT License
412 stars 68 forks source link

utf8.find bug when init==0 #34

Closed johnd0e closed 3 years ago

johnd0e commented 3 years ago
string.find('1234','.*',0) -- 1,4 as expected
utf8.find('1234','.*',0)   -- 0,3 bug!

https://www.lua.org/manual/5.1/manual.html#pdf-string.find