Detect the dominant newline character of a string