What is the difference between \r and \n?
They’re different characters. \r is carriage return, and \n is line feed. On “old” printers, \r sent the print head back to the start of the line, and \n advanced the paper by one line. Both were therefore necessary to start printing on the next line. Obviously that’s somewhat irrelevant now, although depending on the … Read more