def chomp(string):
    """
    Delete carriage return and line feed from end of string.

    :Example:

    >>> from pygtftk.utils import chomp
    >>> from pygtftk.utils import NEWLINE
    >>> assert NEWLINE not in chomp("blabla\\r\\n")

    """
    string = string.rstrip('\r\n')
    return string
