Comment on page
Converting a string to vectors and back
let s = "Hello there";
// Convert a string to a Vec<char>
let cvec: Vec<char> = s.chars().collect();
Carrying from the above example,
// Convert a string to a Vec<char>
let cvec: Vec<char> = s.chars().collect();
// Convert a Vec<char> into a String
let back: String = cvec.into_iter().collect();
Last modified 3yr ago