Answers for "rust in a string, replace multiple spaces with single space"

0

rust in a string, replace multiple spaces with single space

let re = Regex::new(r"\s+").unwrap();
let t = re.replace_all(s, " ");
Posted by: Guest on February-24-2021

Code answers related to "rust in a string, replace multiple spaces with single space"

Browse Popular Code Answers by Language