'Given an index, determines the line of the index.
Arguments:
index: The index into the original string for which we want to know
the line number
Returns:
The line number of the provided index.'

def index_to_line_number(self, index):

    current_line_number = 0
    for line_break_index in self._line_start_indexes:
        if (line_break_index <= index):
            current_line_number += 1
        else:
            break
    return current_line_number
