Skip to content

Instantly share code, notes, and snippets.

@asnimansari
Last active May 2, 2020 08:48
Show Gist options
  • Save asnimansari/08ab25715264aef40e7f7567076e815e to your computer and use it in GitHub Desktop.
Save asnimansari/08ab25715264aef40e7f7567076e815e to your computer and use it in GitHub Desktop.
Rust String & Charecter types
| | 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 |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment