0
Strings
What is the difference between \n and \r ??
1 Odpowiedź
+ 6
'\r' is carriage return(CR).
'\n' is line feed(LF)
Both '\n' and '\r' mean newline.
However, these two are different character code.
Character codes used for new lines are different for each OS.
for examle,
Windows CR + LF
linux LF
if you create a program intended for cross-platform, you may need to consider this.