\ n is a newline, English is new line, which means to make the cursor to the beginning
\ r is the carriage return, English is carriage return, which means to move the cursor down one cell
\ r \ n indicates carriage return line
We usually use the computer, has been accustomed to the carriage return and a change of line once, hit a return, that is, the carriage returns, but also a newline.
1, \ n Soft return :
Represents a newline in windows and returns to the beginning of the next line. Equivalent to the \ r effect in Mac OS.
In Linux, Unix only represents line breaks, but does not go back to the beginning of the next line.
2, \ r Soft Space:
In Linux, Unix represents the return to the beginning of the line.
Represents a newline in Mac OS and returns to the beginning of the next line, equivalent to the effect of \ n in Windows.
3, \ t jumps (moves to the next column).
They are valid in a double-quote or delimiter-represented string, and are not valid in a single-quote string.
\ r \ n generally used together, to indicate the key on the keyboard return, you can only use \ n.
\ t represents the "tab" key on the keyboard.
Just like you use the difference between enter and Shift+enter
4. NewLine symbols in the file:
Linux,unix: \ r \ n
Windows: \ n
Mac OS: \ r
5, the meaning of commonly used escape symbols:
\ 0x0a (10) in LF or ASCII
\ r 0x0d (13) in CR or ASCII
\ t Horizontal tab-HT or ASCII in 0x09 (9)
\ \ counter Slash
\$ dollar Symbol
\ "Double quotation marks
\ ' Single quotation mark
6. The difference between "\ r \ n" and "</br>"
\ r \ n is the output HTML code wrapping, the customer sees the effect does not wrap.
If you are exporting to a browser, use <br/>
\ r \ n, like you make a Web page in Dreamweaver, click Enter in the source code, is to feed the source code return line.
is to output one (HTML markup language) that is interpreted as the input word wrap in HTML. \ r \ n The role is to give the source code carriage return line, input, look at the HTML source code, it will be to have a newline, and the HTML interpreter (browser) think it is useless, with not all the same display.
The difference between \r,\n,\r\n