+ 1

Can anyone explain me difference between \n and \r?

14th Feb 2022, 7:15 PM
Khadija Muneeb
3 ответов
+ 3
\n is a newline and \r is carriage return
14th Feb 2022, 8:15 PM
Slick
Slick - avatar
+ 1
\n will move to the next line. eg. hitting the enter key. \r carriage return means it will move to the beginning of the line you are currently on, and not create a new line. eg. hitting the home key.
14th Feb 2022, 9:25 PM
Matthew Lombard
Matthew Lombard - avatar