Created
January 4, 2022 16:26
-
-
Save eduardonunesp/d284c57128b3ed20944f91451123dc92 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// literals | |
let byte_data = b"This is a string of bytes"; | |
let raw_string = r##"This "can" have weird \"characters" in it 'no' problem"##; | |
let raw_byte = br##"you can even mix and match"##; | |
// Convert to bytes | |
let data = "abcdefghijklmnopqrstuvwxyz"; | |
let data_ref = data.as_bytes(); | |
let data_owned = data.into_bytes(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment