Skip to main content

endswith_lf

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

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

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

Parameters

NameTypeDescription
lineUnion[str, bytes]The text or bytestring to check for a trailing line feed

Returns

TypeDescription
booleanTrue if the input ends with a line feed character, False otherwise