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