We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
string.find
1 parent f04877f commit c8a24b9Copy full SHA for c8a24b9
internal/lua/stringlib_test.go
@@ -31,6 +31,18 @@ func TestStringFind(t *testing.T) {
31
init: 1,
32
want: []any{int64(1), int64(0)},
33
},
34
+ {
35
+ s: "aaa",
36
+ pattern: "^a",
37
+ init: 1,
38
+ want: []any{int64(1), int64(1)},
39
+ },
40
41
42
43
+ init: 2,
44
+ want: []any{int64(2), int64(2)},
45
46
{
47
s: "alo",
48
pattern: "",
@@ -305,7 +317,7 @@ func TestStringFind(t *testing.T) {
305
317
s: "]]]áb",
306
318
pattern: "[^]]+",
307
319
308
- want: []any{int64(1), int64(3)},
320
+ want: []any{int64(4), int64(6)},
309
321
310
322
311
323
s: "0alo alo",
0 commit comments