windows/linux/mac的回车换行符

不同的操作系统回车换行符定义是不一样的,如果你跟我一样记不住,crlf几个字段的含义的话,记录下来就非常有必要了
 
win        \r\n  CRLF ASCII 13 carriage return/line feed
linux/unix \n    CR   ASCII 13 carriage return
Mac   OS   \r    LF   ASCII 10 line feed
 
CR(Carriage Return) 代表回车,对应字符 '\r';LF(Line Feed) 代表换行,对应字符 '\n';
 
wind:'\r\n' -- 换行回车;
linux:  '\n'    --  回车
mac:'\r'     -- 换行;
posted on 2018-04-13 21:40  im5437  阅读(232)  评论(0编辑  收藏  举报