📜  什么是 ^m 字符 - 无论代码示例

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

代码示例1
Short answer:
^M is how Vim displays the 0x0D character. The 0x0D character is also 
represented by CR (carriage return), \r, and 13 in decimal. In Windows it
is used in conjunction with the line feed character (e.g. 0x0D 0x0A) to 
denote new lines.

In Vim you can remove the ^M characters by typing:
:%s/^M//g

You can also run the dos2unix utility on the file.