Answers for "rust replace multiple spaces with a 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 replace multiple spaces with a single space"

Browse Popular Code Answers by Language