String.Find differs from its Lua equivalent

Issue #48 open
mezzodrinker created an issue

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)

  1. Log in to comment