'Splits the given string to lines.
It is possible to get only a selection of lines from ``start``
to ``end`` so that ``start`` index is inclusive and ``end`` is
exclusive. Line numbering starts from 0, and it is possible to
use negative indices to refer to lines from the end.
Lines are returned without the newlines. The number of
returned lines is automatically logged.
Examples:
| @{lines} =        | Split To Lines | ${manylines} |    |    |
| @{ignore first} = | Split To Lines | ${manylines} | 1  |    |
| @{ignore last} =  | Split To Lines | ${manylines} |    | -1 |
| @{5th to 10th} =  | Split To Lines | ${manylines} | 4  | 10 |
| @{first two} =    | Split To Lines | ${manylines} |    | 1  |
| @{last two} =     | Split To Lines | ${manylines} | -2 |    |
Use `Get Line` if you only need to get a single line.'

def split_to_lines(self, string, start=0, end=None):

    start = self._convert_to_index(start, 'start')
    end = self._convert_to_index(end, 'end')
    lines = string.splitlines()[start:end]
    logger.info(('%d    lines    returned' % len(lines)))
    return lines
