def stripline(line, stripboth=False):
    """
    Default line transformer.
    Returns the supplied line after calling rstrip
    :param line: string representing a file line
    :param stripboth: Optional boolean flag indicating both l and r strip should be applied
    :return: The trimmed line
    """
    if stripboth:
        return line.lstrip().rstrip()
    return line.rstrip()