'Creates a list, where each entry represents the index into the string
where the next line break was found.
Arguments:
string: The string in which to find line breaks.
Returns:
A list of indices into the string at which each line begins.'

def _process_line_breaks(self, string):

    line_start_indexes = [0]
    index = 0
    while True:
        index = string.find('\n', index)
        if (index < 0):
            break
        index += 1
        line_start_indexes.append(index)
    return line_start_indexes
