Open OdoctorG opened 3 years ago
So... string.find
has apparently never matched the documentation (the code is 8-9 years old). It's actually called find_first
. You can see the mismatch here: https://github.com/presidentbeef/brat/blob/main/core/core.lua#L4910-L4924
string.find
is from enumerable.find
which takes a function as an argument: https://github.com/presidentbeef/brat/blob/main/core/core.lua#L2176-L2196
And apparently that isn't documented, either! :laughing:
The builtin function "find" doesnt seem to work, atleast not in the try brat online editor.
Code:
"amogus".find "gus"
Ouput:
Interestingly
.include?
works but not find