V2EX  ›  英汉词典
Enqueued related words: Quotation Mark

Escape Character

定义 Definition

“Escape character”(转义字符)是在字符串或文本中用来改变后续字符“字面含义/解释方式”的特殊字符,常用于在代码里表示引号、换行、反斜杠等原本具有特殊意义或不可直接输入的符号(不同语言常见实现是反斜杠 \)。

发音 Pronunciation (IPA)

/ɪˈskeɪp ˈkærɪktər/

例句 Examples

In many languages, a backslash is used as an escape character.
在许多编程语言中,反斜杠用作转义字符。

To include a quotation mark inside a string, you often need an escape character so the parser won’t treat it as the end of the string.
要在字符串中包含引号,通常需要使用转义字符,这样解析器才不会把它当作字符串结束符。

词源 Etymology

escape 源自“逃离/避开”的含义,在这里引申为“让字符避开原本的特殊解释”;character 指“字符”。合在一起就是“使后续字符按另一种方式被解释的字符”。该术语主要在计算机与排版语境中发展起来。

相关词 Related Words

文学与著作 Literary/Notable Works

  • The C Programming Language(Kernighan & Ritchie)中讨论字符串与转义序列(escape sequences)的用法
  • Programming Perl(Larry Wall 等)中大量涉及转义字符/转义序列在正则与字符串里的规则
  • The Unicode Standard(Unicode Consortium)相关章节涉及字符表示、转义与编码表示方式
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2859 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 17ms · UTC 02:33 · PVG 10:33 · LAX 18:33 · JFK 21:33
♥ Do have faith in what you're doing.