Allow specifying offset for common.is_utf8_cont

This commit is contained in:
Guldoman
2021-10-11 22:18:02 +02:00
parent 8b634daa66
commit 3a71528087
+2 -2
View File
@@ -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