Is there a platform independant function that will remove appropriate EOL characters from a string? I don't want to use strip() since it will also remove other whitespace I want to keep.