You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: changelog.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@
9
9
*`FIX` reimplement section `luals.config` in file doc.json
10
10
*`FIX` incorrect file names in file doc.json
11
11
*`FIX` remove extra `./` path prefix in the check report when using `--check=.`
12
+
*`FIX` incorrect links for `pattern` in `string` methods
12
13
*`FIX` fix type annotations for bit module
13
14
*`FIX` Another regression related to type narrow and generic param introduced since `v3.10.1`[#3087](https://github.com/LuaLS/lua-language-server/issues/3087)
Copy file name to clipboardExpand all lines: locale/en-us/meta.lua
+25-6Lines changed: 25 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -647,11 +647,13 @@ string.char =
647
647
'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.'
648
648
string.dump=
649
649
'Returns a string containing a binary representation (a *binary chunk*) of the given function.'
650
-
string.find=
650
+
string.find['>5.2']=
651
651
'Looks for the first match of `pattern` (see §6.4.1) in the string.'
652
+
string.find['=5.1'] =
653
+
'Looks for the first match of `pattern` (see §5.4.1) in the string.'
652
654
string.format=
653
655
'Returns a formatted version of its variable number of arguments following the description given in its first argument.'
654
-
string.gmatch=
656
+
string.gmatch['>5.2']=
655
657
[[
656
658
Returns an iterator function that, each time it is called, returns the next captures from `pattern` (see §6.4.1) over the string s.
657
659
@@ -664,17 +666,34 @@ As an example, the following loop will iterate over all the words from string s,
664
666
end
665
667
```
666
668
]]
667
-
string.gsub=
669
+
string.gmatch['=5.1'] =
670
+
[[
671
+
Returns an iterator function that, each time it is called, returns the next captures from `pattern` (see §5.4.1) over the string s.
672
+
673
+
As an example, the following loop will iterate over all the words from string s, printing one per line:
674
+
```lua
675
+
s =
676
+
"hello world from Lua"
677
+
for w in string.gmatch(s, "%a+") do
678
+
print(w)
679
+
end
680
+
```
681
+
]]
682
+
string.gsub['>5.2'] =
668
683
'Returns a copy of s in which all (or the first `n`, if given) occurrences of the `pattern` (see §6.4.1) have been replaced by a replacement string specified by `repl`.'
684
+
string.gsub['=5.1'] =
685
+
'Returns a copy of s in which all (or the first `n`, if given) occurrences of the `pattern` (see §5.4.1) have been replaced by a replacement string specified by `repl`.'
669
686
string.len=
670
687
'Returns its length.'
671
688
string.lower=
672
689
'Returns a copy of this string with all uppercase letters changed to lowercase.'
673
-
string.match=
690
+
string.match['>5.2']=
674
691
'Looks for the first match of `pattern` (see §6.4.1) in the string.'
675
-
string.pack=
692
+
string.match['=5.1'] =
693
+
'Looks for the first match of `pattern` (see §5.4.1) in the string.'
694
+
string.pack['>5.2'] =
676
695
'Returns a binary string containing the values `v1`, `v2`, etc. packed (that is, serialized in binary form) according to the format string `fmt` (see §6.4.2) .'
677
-
string.packsize=
696
+
string.packsize['>5.2']=
678
697
'Returns the size of a string resulting from `string.pack` with the given format string `fmt` (see §6.4.2) .'
679
698
string.rep['>5.2'] =
680
699
'Returns a string that is the concatenation of `n` copies of the string `s` separated by the string `sep`.'
0 commit comments