blob: cc4deca87dfdc8b89e8223d0f2cbe519e23342ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
---@class utf8
utf8 = {}
---@param code integer
---@vararg integer
---@return string
function utf8.char(code, ...) end
utf8.charpattern = '[\0-\x7F\xC2-\xF4][\x80-\xBF]*'
---@param s string
---@param lax boolean?
---@return fun():integer, integer
function utf8.codes(s, lax) end
---@param s string
---@param i integer?
---@param j integer?
---@param lax boolean?
---@return integer code
---@return ...
function utf8.codepoint(s, i, j, lax) end
---@param s string
---@param i integer?
---@param j integer?
---@param lax boolean?
---@return integer?
---@return integer errpos?
function utf8.len(s, i, j, lax) end
---@param s string
---@param n integer
---@param i integer
---@return integer p
function utf8.offset(s, n, i) end
|