What is the difference between this two strings?
"first line \n second line" , "first line \r\n second line"
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
\r– Carriage Return\n– Line Feed\r\nis often used in preference to\nas it displays properly on both unix and Windows.Carriage Return just returns the cursor to the beginning of the same line (without advancing to the next line) whereas a Line Feed feeds a new line.
Note: (hover over the grey box below to find out)