Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

rust in a string, replace multiple spaces with single space

let re = Regex::new(r"s+").unwrap();
let t = re.replace_all(s, " ");
 
PREVIOUS NEXT
Tagged: #rust #replace #multiple #spaces #single #space
ADD COMMENT
Topic
Name
3+4 =