def next_line(bdata: bytes, start_pos: int=0) -> tuple:
    """Advance to the next non EOL char and detect following EOL."""
    cursor = start_pos
    i = cursor
    start_found = False
    while cursor < len(bdata):
        if not start_found and bdata[cursor] not in EOL:
            start_found = True
            i = cursor
        if start_found and bdata[cursor] in EOL:
            j = cursor
            return i, j
        cursor += 1
    return None, None
Advance to the next non EOL char and detect following EOL.
pdfsyntax/objects.py