\t 制表符
fmt.Print("hello\tworld")
//hello world
\n 换行符
fmt.Print("hello\nworld")
//hello
//world
\r 回车符
fmt.Print("yoni是帅哥\rnike")
//nike是帅哥
\\ 表示一个斜杠
fmt.Print("hello\\tworld")
//hello\world
\" 表示一个双引号
fmt.Print("hello\"tworld")
//hello"world
本文深入探讨了编程中常用的转义字符,包括制表符、换行符、回车符等,解析了它们在代码中的实际应用及效果展示,是理解和使用转义字符不可或缺的指南。
1116

被折叠的 条评论
为什么被折叠?



