def _remove_lines_starting_with(string, start_char):
    """
    Utility function that removes line starting with the given character in the
    provided str.

    :param data: the str to remove lines.
    :param start_char: the character to look for at the begining of a line.

    :returns: the string without the lines starting with start_char.
    """
    data = ""
    for line in string.split('\n'):
        if not line.startswith(start_char):
            data += line + '\n'

    return data