summaryrefslogtreecommitdiff
path: root/server/locale/en-US
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-03 18:34:36 +0800
committersumneko <sumneko@hotmail.com>2019-04-03 18:34:36 +0800
commitb311bf5b0332518b8c9870d90557ca09eb19ee26 (patch)
treeceaefc5a601243b1b17e036e4bc9de2fe78c2922 /server/locale/en-US
parent10aafe270e4a3de3595c002676fc559b78ea3106 (diff)
downloadlua-language-server-b311bf5b0332518b8c9870d90557ca09eb19ee26.zip
生下的Lua 5.4 API
Diffstat (limited to 'server/locale/en-US')
-rw-r--r--server/locale/en-US/libs/lua/math.lni14
-rw-r--r--server/locale/en-US/libs/lua/string.lni11
2 files changed, 25 insertions, 0 deletions
diff --git a/server/locale/en-US/libs/lua/math.lni b/server/locale/en-US/libs/lua/math.lni
index 1a5ca814..e5bc33b3 100644
--- a/server/locale/en-US/libs/lua/math.lni
+++ b/server/locale/en-US/libs/lua/math.lni
@@ -65,6 +65,20 @@ description = [[
[randomseed]
description = 'Sets `x` as the "seed" for the pseudo-random generator.'
+["randomseed Lua 5.4"]
+description = [[
+When called with at least one argument,
+the integer parameters `x` and `y` are
+concatenated into a 128-bit `seed` that
+is used to reinitialize the pseudo-random generator;
+equal seeds produce equal sequences of numbers.
+The default for `y` is zero.
+
+When called with no arguments,
+Lua generates a seed with
+a weak attempt for randomness.
+]]
+
[sin]
description = 'Returns the sine of `x` (assumed to be in radians).'
diff --git a/server/locale/en-US/libs/lua/string.lni b/server/locale/en-US/libs/lua/string.lni
index 633afdf8..3c7b987d 100644
--- a/server/locale/en-US/libs/lua/string.lni
+++ b/server/locale/en-US/libs/lua/string.lni
@@ -24,6 +24,17 @@ end
```
]]
+["gmatch Lua 5.4"]
+description = [[
+----------
+```lua
+s = "hello world from Lua"
+for w in string.gmatch(s, "%a+") do
+ print(w)
+end
+```
+]]
+
[gsub]
description = 'Returns a copy of s in which all (or the first `n`, if given) occurrences of the [`pattern`](https://www.lua.org/manual/5.3/manual.html#6.4.1) have been replaced by a replacement string specified by `repl`.'