Add utf8.charpattern

This commit is contained in:
Lars Mueller 2022-10-01 19:31:46 +02:00
parent cd234548e5
commit ef2f1020c7

@ -42,4 +42,7 @@ function utf8.char(...)
return table_concat(chars) return table_concat(chars)
end end
-- Overly permissive pattern that greedily matches a single UTF-8 codepoint
utf8.charpattern = "[%z-\127\194-\253][\128-\191]*"
return utf8 return utf8