'Returns a substring from ``start`` index to ``end`` index.
The ``start`` index is inclusive and ``end`` is exclusive.
Indexing starts from 0, and it is possible to use
negative indices to refer to characters from the end.
Examples:
| ${ignore first} = | Get Substring | ${string} | 1  |    |
| ${ignore last} =  | Get Substring | ${string} |    | -1 |
| ${5th to 10th} =  | Get Substring | ${string} | 4  | 10 |
| ${first two} =    | Get Substring | ${string} |    | 1  |
| ${last two} =     | Get Substring | ${string} | -2 |    |'

def get_substring(self, string, start, end=None):

    start = self._convert_to_index(start, 'start')
    end = self._convert_to_index(end, 'end')
    return string[start:end]
