diff options
-rw-r--r-- | server/libs/lua53/string.lni | 4 | ||||
-rw-r--r-- | server/locale/en-US/libs/lua53/string.lni | 59 | ||||
-rw-r--r-- | server/test/hover/init.lua | 1 |
3 files changed, 63 insertions, 1 deletions
diff --git a/server/libs/lua53/string.lni b/server/libs/lua53/string.lni index 332ccc5a..522e373a 100644 --- a/server/libs/lua53/string.lni +++ b/server/libs/lua53/string.lni @@ -70,6 +70,7 @@ default = 1 [[.args]] name = 'plain' type = 'boolean' +optional = 'self' [[.returns]] name = 'start' type = 'integer' @@ -77,6 +78,7 @@ type = 'integer' name = 'end' type = 'integer' [[.returns]] +name = 'captured' type = '...' [format] @@ -146,6 +148,7 @@ type = 'integer' optional = 'self' default = 1 [[.returns]] +name = 'captured' type = 'string' [pack] @@ -216,6 +219,7 @@ type = 'string' name = 'pos' type = 'integer' optional = 'self' +default = 1 [[.returns]] type = '...' [[.returns]] diff --git a/server/locale/en-US/libs/lua53/string.lni b/server/locale/en-US/libs/lua53/string.lni index 5d8e3fbb..a5d4bcc5 100644 --- a/server/locale/en-US/libs/lua53/string.lni +++ b/server/locale/en-US/libs/lua53/string.lni @@ -1 +1,58 @@ -[string] +[byte] +description = 'Returns the internal numeric codes of the characters `s[i], s[i+1], ..., s[j]`.' + +[char] +description = 'Returns a string with length equal to the number of arguments, in which each character has the internal numeric code equal to its corresponding argument.' + +[dump] +description = 'Returns a string containing a binary representation (a binary chunk) of the given function.' + +[find] +description = 'Looks for the first match of `pattern` in the string.' + +[format] +description = 'Returns a formatted version of its variable number of arguments following the description given in its first argument.' + +[gmatch] +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` have been replaced by a replacement string specified by `repl`.' + +[len] +description = 'Returns its length.' + +[lower] +description = 'Returns a copy of this string with all uppercase letters changed to lowercase.' + +[match] +description = 'Looks for the first match of `pattern` in the string.' + +[pack] +description = 'Returns a binary string containing the values `v1, v2, etc.` packed (that is, serialized in binary form) according to the format string `fmt`.' + +[packsize] +description = 'Returns the size of a string resulting from `string.pack` with the given format.' + +[rep] +description = 'Returns a string that is the concatenation of `n` copies of the string `s` separated by the string `sep`.' + +[reverse] +description = 'Returns a string that is the string s reversed.' + +[sub] +description = 'Returns the substring of the string that starts at `i` and continues until `j`.' + +[unpack] +description = 'Returns the values packed in string according to the format string `fmt`.' + +[upper] +description = 'Returns a copy of this string with all lowercase letters changed to uppercase.' diff --git a/server/test/hover/init.lua b/server/test/hover/init.lua index 052b0cfd..0321a952 100644 --- a/server/test/hover/init.lua +++ b/server/test/hover/init.lua @@ -179,4 +179,5 @@ string.<?lower?>() [[ function string.lower(string) -> string +Returns a copy of this string with all uppercase letters changed to lowercase. ]] |