def line_starts_with(line: str, string: str, case_insensitive: bool=True
    ) ->bool:
    """
    Checks if the line starts with the given string.

    :param line:                The line to check.
    :param string:              The string to look for.
    :param case_insensitive:    Whether the check should disregard case.
    :return:                    True if the line starts with the given string, False otherwise.
    """
    if case_insensitive:
        line = line.lower()
        string = string.lower()
    return line.startswith(string)
