EmmyLua -> LuaLS
This commit is contained in:
9
init.lua
9
init.lua
@@ -188,7 +188,7 @@ local shift_18 = 262144 -- 2^18
|
||||
---@param str string The input string containing UTF-8 encoded characters.
|
||||
---@param ibs integer The starting byte position in the string (inclusive).
|
||||
---@param jbs integer The ending byte position in the string (inclusive).
|
||||
---@return integer...
|
||||
---@return integer?, integer?
|
||||
function string_utf8.unicode(str, ibs, jbs)
|
||||
ensureArgType(str, "string", 1, "string_utf8.unicode")
|
||||
ensureArgType(ibs, "number", 2, "string_utf8.unicode")
|
||||
@@ -253,7 +253,7 @@ end
|
||||
---@param j integer The ending character index (default: i). Negative values count from the end.
|
||||
---@overload fun(str: string)
|
||||
---@overload fun(str: string, i: number)
|
||||
---@return integer...
|
||||
---@return integer?, integer?
|
||||
function string_utf8.byte(str, i, j)
|
||||
ensureArgType(str, "string", 1, "string_utf8.byte")
|
||||
ensureArgType(i, "number", 2, "string_utf8.byte")
|
||||
@@ -299,7 +299,7 @@ end
|
||||
---Creates an iterator to generate UTF-8 substrings of a specified length.
|
||||
---@param str string The input UTF-8 encoded string.
|
||||
---@param sub_len integer? The length of each substring in characters (default: 1).
|
||||
---@return fun(skip_ptr: table | nil, bs: integer | nil)
|
||||
---@return fun(skip_ptr: table | nil, bs: integer | nil):(integer?, string?, integer?)
|
||||
function string_utf8.gensub(str, sub_len)
|
||||
sub_len = sub_len or 1
|
||||
|
||||
@@ -312,6 +312,7 @@ function string_utf8.gensub(str, sub_len)
|
||||
|
||||
---@param skip_ptr table
|
||||
---@param bs integer
|
||||
---@return integer?, string?, integer?
|
||||
return function(skip_ptr, bs)
|
||||
bs = (bs and bs or 1) + (skip_ptr and (skip_ptr[1] or 0) or 0)
|
||||
|
||||
@@ -457,7 +458,7 @@ end
|
||||
|
||||
---Creates an iterator to traverse UTF-8 encoded characters in a string.
|
||||
---@param str string The input UTF-8 encoded string.
|
||||
---@return fun(skip_ptr: table|nil)
|
||||
---@return fun(skip_ptr: table|nil):integer?, integer?, integer?
|
||||
function string_utf8.codes(str)
|
||||
|
||||
ensureArgType(str, "string", 1, "string_utf8.codes")
|
||||
|
||||
Reference in New Issue
Block a user