Rust token 系统,各种字符串
https://doc.rust-lang.org/reference/tokens.html
其中包括多行原始字符串,你可以把HTML放进去,都是能装的。它的特点就是超级能装。
什么样的字符串都可以往里面装
Examples
Characters and strings
Example # sets Characters Escapes
Character 'H' 0 All Unicode Quote & ASCII & Unicode
String "hello" 0 All Unicode Quote & ASCII & Unicode
Raw string r#"hello"# 0 or more* All Unicode N/A
Byte b'H' 0 All ASCII Quote & Byte
Byte string b"hello" 0 All ASCII Quote & Byte
Raw byte string br#"hello"# 0 or more* All ASCII N/A
* The number of #s on each side of the same literal must be equivalent
ASCII escapes
Name
\x41 7-bit character code (exactly 2 digits, up to 0x7F)
\n Newline
\r Carriage return
\t Tab
\\ Backslash
\0 Null
Byte escapes
Name
\x7F 8-bit character code (exactly 2 digits)
\n Newline
\r Carriage return
\t Tab
\\ Backslash
\0 Null
Unicode escapes
Name
\u{7FFF} 24-bit Unicode character code (up to 6 digits)
Quote escapes
Name
\' Single quote
\" Double quote
Numbers
Number literals* Example Exponentiation Suffixes
Decimal integer 98_222 N/A Integer suffixes
Hex integer 0xff N/A Integer suffixes
Octal integer 0o77 N/A Integer suffixes
Binary integer 0b1111_0000 N/A Integer suffixes
Floating-point 123.0E+77 Optional Floating-point suffixes
分类: 默认 标签: 发布于: 2022-03-31 07:57:38, 更新于: 2022-03-31 07:57:38