def line_starts_with(line, string, case_insensitive=True):
    """
    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.
    """

    # Remove case information if case-insensitive
    if case_insensitive:
        line = line.lower()
        string = string.lower()

    # Return the result of the check
    return line.startswith(string)