shell C C++ rust lisp perl 中转义字符
- Shell:
- \n: newline
- \t: tab
- \r: carriage return
- ': single quote
- ": double quote
- \: backslash
- C:
- \n: newline
- \t: tab
- \r: carriage return
- ': single quote
- ": double quote
- \: backslash
- \a: alert (bell)
- \b: backspace
- \f: form feed
- \v: vertical tab
- \0: null character
- C++:
- Same as C, with additional escape sequences:
- ? : question mark
- \xhh : hexadecimal value
- \ooo : octal value
- Rust:
- \n: newline
- \t: tab
- \r: carriage return
- ': single quote
- ": double quote
- \: backslash
- Lisp:
- Lisp uses a different syntax for strings and characters, so there are no escape sequences.
- Perl:
- Same as C, with additional escape sequences:
- \e: escape character
- \s: whitespace character
- \w: word character
- \d: digit character
- \xhh: hexadecimal value
- \ooo: octal valu
原文地址: https://www.cveoy.top/t/topic/eb8Y 著作权归作者所有。请勿转载和采集!