Skip to content

Instantly share code, notes, and snippets.

@rust-play
Created April 27, 2018 05:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rust-play/41a5da9e572171fc9021928930521cff to your computer and use it in GitHub Desktop.
Save rust-play/41a5da9e572171fc9021928930521cff to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
fn main(){
let mut a = String::from("asdfght");
a.push('\0');
let c:String = a.chars().rev().collect::<Vec<char>>();
let c:String = a.chars().rev().collect::<Vec<char>>();
println!("{:?}", std::str::from_chars(c.as_slice()));
}
#[test]
fn tenst(){
assert!(true,true)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment