- changed milestone to 3.0.7
String.Find differs from its Lua equivalent
Issue #48
open
Take the following script:
String.Find('This is a test.', 'i')
This should, if String.Find
behaved like its Lua equivalent, return 3, 3
, as the indexes are 1-based and the begin and end positions are both inclusive. However, String.Find
returns 2, 3
as 0-based indexes, with the end position being exclusive.
The behaviour should be adjusted to be equivalent to Lua's string.find
.
Don’t forget to update the wiki page once this issue has been resolved.
Comments (3)
-
reporter -
reporter In addition to the above,
String.Find
uses Java’s regular expression syntax, whereas Lua’s patterns work differently. -
reporter - changed status to open
- Log in to comment