(这篇随笔是 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. String类详解(1)

    首先String是一个类. 1,实例化String类方法. 1)直接赋值:String name="haha"; 2)通过关键字:String name=new String(&q ...

  2. ios开发中如何隐藏各种bar

    转载自http://www.cnblogs.com/lovecode/articles/2234557.html 状态条Status Bar [UIApplication sharedApplicat ...

  3. 【转】【WPF】TemplateBinding和Binding的区别

    定义 TemplateBinding是为了某个特定场景优化出来的数据绑定版本--需要把ControlTemplate里面的某个Property绑定到应用该ControlTemplate的控件的对应Pr ...

  4. struts2中简单的文件上传

    2016-08-31 一.       文件上传 利用commons-fileupload-1.2.1.jar实现简单的上传文件,首先在页面上填写表单,记得加上enctype="multip ...

  5. The ServiceClass object does not implement the required method in the following form: OMElement sayHello(OMElement e)

    今天遇到一件诡异的事情,打好的同一个aar包,丢到测试环境tomcat,使用soapui测试,正常反馈结果. 丢到本地tomcat,使用soapui测试,始终报以下错误. <soapenv:En ...

  6. Ta-lib 函数一览

    import tkinter as tk from tkinter import ttk import matplotlib.pyplot as plt import numpy as np impo ...

  7. JS案例之6——瀑布流布局(1)

    在实际的项目中,偶尔会用到一种布局——瀑布流布局.瀑布流布局的特点是,在多列布局时,可以保证内容区块在水平方向上不产生大的空隙,类似瀑布的效果.简单的说,在垂直列表里,内容区块是一个挨着一个的.当内容 ...

  8. [MetaHook] Quake Bink function

    If you want to play Bink video in game, maybe you need this code. QBink.h #ifndef QBINK_H #define QB ...

  9. 实验五实验报告 20135324&&20135330

    北京电子科技学院(BESTI) 实验报告 课程:深入理解计算机系统 班级:1353 姓名:张若嘉 杨舒雯 学号:20135330 20135324 成绩: 指导教师:娄嘉鹏 实验日期:2015.11. ...

  10. 20145316GDB调试汇编堆栈

    GDB调试例子的汇编堆栈 代码 直接-m32编译出现问题 编译64位Linux版本32位的二进制文件,需要安装一个库,使用指令sudo apt-get install libc6-dev-i386 编 ...