所有转义字符是什么? [英] What are all the escape characters?

查看:27
本文介绍了所有转义字符是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道一些 Java 中的转义字符,例如

I know some of the escape characters in Java, e.g.

\n : Newline
\r : Carriage return
\t : Tab
\\ : Backslash
...

某处有完整的列表吗?

推荐答案

您可以找到完整列表 这里.

You can find the full list here.

  • \t 此时在文本中插入一个制表符.
  • \b 此时在文本中插入一个退格.
  • \n 此时在文本中插入一个换行符.
  • \r 此时在文本中插入一个回车.
  • \f 此时在文本中插入换页符.
  • \' 此时在文本中插入一个单引号字符.
  • \" 此时在文本中插入一个双引号字符.
  • \\ 此时在文本中插入一个反斜杠字符.
  • \t Insert a tab in the text at this point.
  • \b Insert a backspace in the text at this point.
  • \n Insert a newline in the text at this point.
  • \r Insert a carriage return in the text at this point.
  • \f Insert a formfeed in the text at this point.
  • \' Insert a single quote character in the text at this point.
  • \" Insert a double quote character in the text at this point.
  • \\ Insert a backslash character in the text at this point.

这篇关于所有转义字符是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆