当前位置:网站首页>Escape character notes
Escape character notes
2022-07-28 06:58:00 【wr_01】
Java Some letters are prefixed in the language "\“ A character used to express a particular meaning , Such as \0,\t,\n etc. , This is called an escape character (Escape Character).
Java See the backslash as the escape character by default , If you want to in java Using backslashes in requires \
Escape characters are used to represent common ones that cannot be displayed ASCII character . Such as \0,\t,\n etc. , It's called an escape character , Because of the following characters , It's not the original ASCII The character means .
be-all ASCII code Both can be used. "\“+ Numbers ( It's usually 8 Hexadecimal Numbers ) To express .
One 、 Slash and backslash
/ Oblique line (slash), Also known as forward slash ( Forward slash ), Linux The system file path uses .
\ Backslash (backslash), Windows System file path , Program code escape , Unicode Coding, etc .
Two 、 Backslash usage scenario
1. Octal digit escape ASCII
\ + 1 To 3 Eight digit octal number ( Range ’\000’~’\377’)
\0: Null character
2. Hexadecimal digit escape Unicode
\u + Four hexadecimal numbers ;(0~65535)
\u0000: Null character
Commonly used Unicode Character comparison table
The escape of point :. -> \u002E
The escape of the dollar sign :$ -> \u0024
The escape of the power sign :^ -> \u005E
The escape of the left brace :{ -> \u007B
The escape of the left square bracket :[ -> \u005B
Escape of left parenthesis :( -> \u0028
The escape of the vertical line :| -> \u007C
The escape of the right parenthesis :) -> \u0029
The escape of asterisk :* -> \u002A
The escape of the plus sign :+ -> \u002B
The escape of question mark :? -> \u003F
Escape of backslash : -> \u005C
3. Ordinary characters represent special characters
| Serial number | Escape character | meaning | ASCII Code value ( Decimal system ) |
|---|---|---|---|
| 1 | \a | Ring the bell (BEL) | 007 |
| 2 | \b | Backspace (BS) , Move the current position to the previous column | 008 |
| 3 | \f | Change the page (FF), Move the current position to the beginning of the next page | 012 |
| 4 | \n | Line break (LF) , Moves the current position to the beginning of the next line | 010 |
| 5 | \r | enter (CR) , Move the current position to the beginning of the line | 013 |
| 6 | \t | Horizontal TAB (HT) ( Skip to the next TAB Location ) | 009 |
| 7 | \v | Vertical tabulation (VT) | 011 |
| 8 | \ | Represents a backslash character "" | 092 |
| 9 | ’ | Represents a single quotation mark ( apostrophe ) character | 039 |
| 10 | " | Represents a double quote character | 034 |
| 11 | ? | Represents a question mark | 063 |
| 12 | \0 | Null character (NUL) | 000 |
| 13 | \ddd | 1 To 3 Any character represented by an octal number | Three octal |
| 14 | \xhh | Any character represented by hexadecimal | Hexadecimal |
边栏推荐
- Custom component -- pure data field & component life cycle
- PKU-2739-Sum of Consecutive Prime Numbers(筛素数法打表)
- 技术分享 | 接口测试价值与体系
- Cocos2d-x learning notes Tile Map tiledmap
- Which brand of air conduction earphones is better? These four should not be missed
- 遍历 二叉树
- Suger Bi create task
- [learning notes] VIM editor
- 网络——传输层(详细版)
- Technology sharing | common proxy tools for interface testing
猜你喜欢

技术分享 | 使用 cURL 发送请求

技术分享 | 接口测试常用代理工具

Qgraphicsview promoted to qchartview

Technology sharing | how to simulate real use scenarios? Mock technology to help you

单元测试框架Jest搭配TypeScript的安装与配置

Which is the best one to make air conduction headphones? Inventory of the best air conduction headphones

Detailed explanation of LNMP construction process

What is the good brand of air conduction Bluetooth headset and the best brand recommendation of air conduction headset

Wechat applet custom compilation mode

Technology sharing | do you know the functions of the server interface automated testing and requests library?
随机推荐
CentOS7部署MySQL数据库服务器
Technology sharing | do you know the functions of the server interface automated testing and requests library?
Network - transport layer (detailed version)
Custom component -- pure data field & component life cycle
NAT和PAT的原理及配置
Centos7 deploy MySQL database server
Applets: lifecycle
raid磁盘阵列
What kind of air conduction Bluetooth headset with good configuration is recommended
Create, traverse and search nodes as required for single linked list
KVM hot migration
MySQL master master
Life cycle (process) of software testing
测试面试题集锦(二)| 测试工具篇(附答案)
Mongo SSL configuration practice
技术分享 | 服务端接口自动化测试, Requests 库的这些功能你了解吗?
How to store floating point data in memory
shell脚本——sort、uniq、tr、数组排序、cut、eval命令配置
OSI seven layer model
Teach you three steps to complete the construction of the test monitoring system hand in hand