Escape Sequences
(这篇随笔是 C++ Primer 5th ed. pp.39-40的摘录)
Some characters, such as backspace or control characters, have no visible image. Such characters are non printable.
Other characters (single and double quotation marks, question marks, and backlash) have special meaning in the language. Our programs cannot use any of these characters directly. Indeed, we use an escape sequence to represent such characters. An escape sequence begins with a backslash ('\'). The language defines several escape sequences:
newline \ horizontal tab \t alert (bell) \a
vertical tab \v backspace \b double quote \"
backslash \\ question mark \? single quote \'
carriage return \r formfeed \f
----------------------------------------------------------------------------------------------------------------------------
We can also write a generalized escape sequence, which is \x followed by one or more hexadecimal digits or a \
followed by one, two, or three octal digits. The value represents the numerical value of the character.
Note that if a \ is followed by more than three octal digits, only the first three are associated with the \. In contrast, \x uses up all the hex digits following it.
Ordinarily, haxadecimal characters with more than 8 bits are used with extended characters sets using one of the following prefixs:
Prefix Meaning Type
u Unicode 16 character char16_t
U Unicode 32 character char32_t
L wide character wchar_t
u8 utf-8 (string literals only) char
--------------------------------------------------------------------------------------------------------------------------
- UISegmentedControl更改圆角
- Class requires API level 3 (current min is 1):
- Unique Paths
- 关于UIScrollView自动调整inset问题
- requestAnimationFrame--进度条
- UIScrollView && UITableView相关属性汇总(2013)
- UIScrollView和UITableView总结
- UITableView tableHeaderView autolayout自动计算高度
- UITableView使用详解
- [leetcode]Implement Queue using Stacks
- UIAlertView弹出框
- Android Uiautomator工具使用
- UIActionSheet底部弹出框
- IOS之UILabel添加下划线
- GUI Frame(一)
- iPhone的UITextField-更改占位符文本颜色
- SPOJ LIS2 Another Longest Increasing Subsequence Problem 三维偏序最长链 CDQ分治
- mybatis:java.lang.IllegalArgumentException:Parameter Maps collection does notcontain value for ...
- 读书笔记--其他UI组件
- 108 Which two statements are true about the Automatic Diagnostic Repository (ADR)? (Choose two.) A.