Skip to main content

endswith_cr

Return True if line (a text or bytestring) ends with '\r'.

def endswith_cr(
line: Union[str, bytes]
) - > boolean

Return True if line (a text or bytestring) ends with '\r'.

Parameters

NameTypeDescription
lineUnion[str, bytes]The text or byte string to check for a trailing carriage return character

Returns

TypeDescription
booleanTrue if the input string or byte sequence ends with a carriage return character, False otherwise