Returns a substring of the string, starting at index 'start' and ending at index 'end'. Both may be negative to indicate counting from the right. The end point is optional and defaults to -1, which is the entire rest of the string.
string.sub ("ABCDEF", 2, 3) --> BC
string.sub ("ABCDEF", 3) --> CDEF
string.sub ("ABCDEF", -1) --> F