summaryrefslogtreecommitdiff
path: root/meta/template/string.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-13 10:57:15 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-13 10:57:15 +0800
commit27034b3d99b31be96865e50d70a776fb3caac088 (patch)
tree1d4f7252bd2dd8cf2f24e7b73e4ab885a76b9eb7 /meta/template/string.lua
parent4e52738f7a315085505ffdbefe9ce6722ec3965f (diff)
downloadlua-language-server-27034b3d99b31be96865e50d70a776fb3caac088.zip
暂存
Diffstat (limited to 'meta/template/string.lua')
-rw-r--r--meta/template/string.lua100
1 files changed, 100 insertions, 0 deletions
diff --git a/meta/template/string.lua b/meta/template/string.lua
index e69de29b..a7bfebe8 100644
--- a/meta/template/string.lua
+++ b/meta/template/string.lua
@@ -0,0 +1,100 @@
+---@class string
+string = {}
+
+---@param s string
+---@param i integer?
+---@param j integer?
+---@return integer
+---@return ...
+function string.byte(s, i, j) end
+
+---@param byte integer
+---@vararg integer
+---@return string
+---@return ...
+function string.char(byte, ...) end
+
+---@param f function
+---@param strip boolean?
+---@return string
+function string.dump(f, strip) end
+
+---@param s string
+---@param pattern string
+---@param init integer?
+---@param plain boolean?
+---@return integer start
+---@return integer end
+---@return ... captured
+function string.find(s, pattern, init, plain) end
+
+---@param s string
+---@vararg string
+---@return string
+function string.format(s, ...) end
+
+---@param s string
+---@param pattern string
+---@param init integer?
+---@return fun():string, ...
+function string.gmatch(s, pattern, init) end
+
+---@param s string
+---@param pattern string
+---@param repl string|table|function
+---@param n integer
+---@return string
+---@return integer count
+function string.gsub(s, pattern, repl, n) end
+
+---@param s string
+---@return integer
+function string.len(s) end
+
+---@param s string
+---@return string
+function string.lower(s) end
+
+---@param s string
+---@param pattern string
+---@param init integer?
+---@return string captured
+function string.match(s, pattern, init) end
+
+---@param fmt string
+---@param v1 string
+---@param v2 string?
+---@vararg string
+---@return string binary
+function string.pack(fmt, v1, v2, ...) end
+
+---@param fmt string
+---@return integer
+function string.packsize(fmt) end
+
+---@param s string
+---@param n integer
+---@param sep string?
+---@return string
+function string.rep(s, n, sep) end
+
+---@param s string
+---@return string
+function string.reverse(s) end
+
+---@param s string
+---@param i integer
+---@param j integer?
+---@return string
+function string.sub(s, i, j) end
+
+---@param fmt string
+---@param s string
+---@param pos integer?
+---@return ...
+---@return integer offset
+function string.unpack(fmt, s, pos) end
+
+---@param s string
+---@return string
+function string.upper(s) end