(这篇随笔是 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

--------------------------------------------------------------------------------------------------------------------------

Escape Sequences的更多相关文章

  1. python escape sequences

    转义字符 描述 \(在行尾时) 续行符 \\ 反斜杠符号 \' 单引号 \" 双引号 \a 响铃 \b 退格(Backspace) \e 转义 \000 空 \n 换行 \v 纵向制表符 \ ...

  2. Escape Sequences in String

     Code Output \' single quote \" double quote \\ backslash \n newline \r carriage return \t tab ...

  3. escape(), encodeURI()和encodeURIComponent()(转)

      escape(), encodeURI()和encodeURIComponent()是在Javascript中用于编码字符串的三个常用的方法,而他们之间的异同却困扰了很多的Javascript初学 ...

  4. 关于 escape、encodeURI、encodeURIComponent

    参考资料:http://hi.baidu.com/flondon/item/983b3af35b83fa13ce9f3291   http://www.w3school.com.cn/js/jsref ...

  5. 比较escape、encodeURI、encodeURIComponent

    估计很多前端工程师并不清楚escape,encodeURI, encodeURIComponent的区别,也不知道什么时候该用哪个方法,以及这些方法为什么要被用到,下面我主要来阐述一下这三个方法的区别 ...

  6. ANSI escape code

    最近在做iOS上的SSH终端项目,主要是在手机上远程连接Unix系统,并进行一些简单的指令操作,类似于SecureCRT:今天想总结一下这个项目中遇到的新东西----ANSI escape code. ...

  7. 关于JavaScript中的escape、encodeURI和encodeURIComponent

    此文内容与关于JavaScript中的编码和解码函数 关联 escape() 方法: 采用ISO Latin字符集对指定的字符串进行编码.所有的空格符.标点符号.特殊字符以及其他非ASCII字符都将被 ...

  8. 转载:escape,encodeURI,encodeURIComponent有什么区别?

    escape unescape encodeURI decodeURI encodeURIComponent decodeURIComponent 这六个方法功能有关联,如果不清楚每一个的作用,很容易 ...

  9. 使用escape、encodeURI 和 encodeURIComponent 解决url中文乱码问题

    escape(), encodeURI()和encodeURIComponent()是在Javascript中用于编码字符串的三个常用的方法,而他们之间的异同却困扰了很多的Javascript初学者, ...

随机推荐

  1. Android 三种动画详解

    [工匠若水 http://blog.csdn.net/yanbober 转载请注明出处.点我开始Android技术交流] 1 背景 不能只分析源码呀,分析的同时也要整理归纳基础知识,刚好有人微博私信让 ...

  2. app:transformClassesWithJarMergingForDebug uplicate entry: android/support/v4/app/BackStackState$1.class

    .Execution failed for task ':app:transformClassesWithJarMergingForDebug'.> com.android.build.api. ...

  3. MString 与 QString 互转

    MQtUtil static MString  toMString (const QString &qstr)   Convenience utility to convert a QStri ...

  4. RDLC系列之一 简单示例

    参照文章:http://www.cnblogs.com/waxdoll/archive/2006/07/24/458409.html#!comments 一.效果图

  5. 【C#】【MySQL】C# 查询数据库语句@Row:=@Row+1

    如何实现数据库查询产生虚拟的一列序号的功能: ) )AS r; 该语句可以实现产生虚拟的一列数据在MySQL中运行没有问题. 但是在C#里面调用去出现了错误"Parameter '@ROW' ...

  6. 加密算法使用(五):RSA使用全过程

    RSA是一种非对称加密算法,适应RSA前先生成一对公钥和私钥. 使用公钥加密的数据可以用私钥解密,同样私钥加密的数据也可以用公钥解密, 不同之处在于,私钥加密数据的同事还可以生成一组签名,签名是用来验 ...

  7. U3D physics总结

    物理系统基于collider, 没有collider的物体不会发生任何主动和被动的物理交互,也不会产生trigger相关消息. 当且仅当A和B都有碰撞体时,两者才有可能发生交互,才有可能产生trigg ...

  8. 当 IDENTITY_INSERT 设置为 OFF 时,不能为表中的标识列插入显式值

    {"当 IDENTITY_INSERT 设置为 OFF 时,不能向表 'OrderList' 中的标识列插入显式值"} 对于这个异常可以从两个角度来处理:A:数据库执行语句  B: ...

  9. JS案例之1——pager 分页

    学习JS大半年之久,第一次自己尝试写一些小插件,写法参考网上某位牛人写代码的思路. 此处代码写的是静态分页.如果需动态分页,还可以修改下.第一次写,还有很多地方可以优化.希望各位大牛踊跃拍砖. 预览图 ...

  10. Caffe学习系列(19): 绘制loss和accuracy曲线

    如同前几篇的可视化,这里采用的也是jupyter notebook来进行曲线绘制. // In [1]: #加载必要的库 import numpy as np import matplotlib.py ...