📜  换行符如何表示 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:07.749000             🧑  作者: Mango

代码示例1
Short answer:
Unix uses \n and Windows uses \r\n to represent newlines.

Equivalent representations for those characters:
\n = LF (line feed) = 0x0A (hexadecimal) = 10 (decimal) = 00001010 (binary)
\r = CR (carriage return) = 0x0D (hexadecimal) = 13 (decimal) = 00001101 (binary)