What is the difference between '/n' and '/r/n'? /n /r/n的区别是什么
2011-01-21 17:29
696 查看
原帖来自http://www.codeguru.com/forum/showthread.php?t=253826
背景
There are a few characters which can indicate a new line. The usual ones are these two:
这里有几种表示新行开始的符号
'/n' or '0x0A' (10 in decimal) -> This character is called "Line Feed" (LF).
'/r' or '0x0D' (13 in decimal) -> This one is called "Carriage return" (CR).
不同的操作系统处理的新行字符是不一样
在Dos和Windows下
新行是按照 /r/n 这样的顺序组合起来的
在Unix和Linux 下
使用'/n'来作为新行的起始
在Mac平台下
Macs 用单个的'/r'来作为新行的起始
背景
There are a few characters which can indicate a new line. The usual ones are these two:
这里有几种表示新行开始的符号
'/n' or '0x0A' (10 in decimal) -> This character is called "Line Feed" (LF).
'/r' or '0x0D' (13 in decimal) -> This one is called "Carriage return" (CR).
不同的操作系统处理的新行字符是不一样
在Dos和Windows下
新行是按照 /r/n 这样的顺序组合起来的
在Unix和Linux 下
使用'/n'来作为新行的起始
在Mac平台下
Macs 用单个的'/r'来作为新行的起始
相关文章推荐
- CareerCup What is the difference between a computers heap and it's stack?
- “检查点”、“里程碑”、“基线”的区别与联系是什么? what's the association between check point, mile stone and baseline?
- 文科和理科的区别(What is the difference between science and engineering)?
- overload与override的区别 What is the difference between overload and override
- Sql 中having 和where的区别 SQL hardest question What is the difference between the WHERE and HAVING claus
- Q: What is the difference between protocol stacks and profiles?蓝牙协议栈和profile的区别
- php中each和print的区别(What is the difference between echo and print?)
- What's the difference between a URI and a URL?
- What is the difference between angle bracket < > and double quotes " " while including header files
- What is the difference between const and static readonly?(const 和 static readonly 的区别?)
- 进程与线程的区别 What is the difference between process and thread
- What is the difference between a = a * (2^3) and a = a << 3?
- macro与inline的区别 What is the difference between macro and inline?
- What is the difference between differed processing mode and interactive mode?
- (C#) What is the difference between "const" and "static readonly" ?
- what is the difference between "isempty"and "isnull"in the qt bool QString::isEmpty () const Retur.
- What is the difference between a process and a thread?
- What is the difference between tag and branch-id?
- What is the difference between Initializing and Assignment inside a constructor?
- What is the difference between "transit","transfer","transmit... and "transport"