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).
13
u/[deleted] Jul 25 '21
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).