Allow specifying offset for `common.is_utf8_cont`
This commit is contained in:
parent
8b634daa66
commit
3a71528087
|
@ -1,8 +1,8 @@
|
|||
local common = {}
|
||||
|
||||
|
||||
function common.is_utf8_cont(char)
|
||||
local byte = char:byte()
|
||||
function common.is_utf8_cont(s, offset)
|
||||
local byte = s:byte(offset or 1)
|
||||
return byte >= 0x80 and byte < 0xc0
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue