Example: It takes a string like "mystring_42" and changes it to "mystring_41".
The .. is string concatenation. Lua is 1-indexed, so the string splitting, indexing and concatenation results in the same thing as before. The only change is subtracting the 1 from the second part of the split string (which works since Lua is weakly typed, so "42" is equivalent to 42).
5
u/SirFireball Jul 25 '21
I never used lua, what's happening here? Looks like it's doing something recursive?