From ec1f746a71dfb981f093bf00322db75d559fd6b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Sat, 23 Apr 2022 00:42:10 +0800 Subject: fix optional parameters --- script/encoder/init.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'script/encoder') diff --git a/script/encoder/init.lua b/script/encoder/init.lua index 0011265a..3c8a58e0 100644 --- a/script/encoder/init.lua +++ b/script/encoder/init.lua @@ -10,9 +10,9 @@ local utf16be = utf16('be', utf8.codepoint '�') local m = {} ---@param encoding encoder.encoding ----@param s string ----@param i integer ----@param j integer +---@param s string +---@param i? integer +---@param j? integer function m.len(encoding, s, i, j) i = i or 1 j = j or #s @@ -33,9 +33,9 @@ function m.len(encoding, s, i, j) end ---@param encoding encoder.encoding ----@param s string ----@param n integer ----@param i integer +---@param s string +---@param n integer +---@param i? integer function m.offset(encoding, s, n, i) i = i or 1 if encoding == 'utf16' -- cgit v1.2.3