kmarius / jsregexp

JavaScript regular expressions for Lua
MIT License
30 stars 3 forks source link

Inclusive index #6

Closed kmarius closed 2 years ago

kmarius commented 2 years ago

Remove the redundant length field and make end_ind inclusive to make it more consistent with lua.

@L3MON4D3 Objections? If not I will also push a new release on luarocks.

L3MON4D3 commented 2 years ago

Luasnip doesn't use length at all, end-exclusive works pretty well for luasnip, but I agree that end-inclusive is more in line with luas stdlib (string.find), so I've no objections :)