string.sub (s, i [, j])
s
i
j
i
j
j
string.sub(s,1,j)
s
j
string.sub(s, -i)
i
s
i
If, after the translation of negative indices, i
is less than 1, it is corrected to 1. If j
is greater than the string length, it is corrected to that length. If, after these corrections, i
is greater than j
, the function returns the empty string.
Please login to continue.