collapse

Crates.iocollapse
lib.rscollapse
version0.1.2
sourcesrc
created_at2022-11-01 17:15:54.462938
updated_at2022-11-20 15:03:47.83579
descriptionTrim and collapse consecutive whitespace to a single space
homepage
repositoryhttps://gitlab.com/ryanobeirne/collapse
max_upload_size
id702943
size5,543
Ryan O'Beirne (ryanobeirne)

documentation

README

Documentation

https://docs.rs/collapse

fn collapse(s: &str) -> String;

#[macro_use]
use collapse::*;

collapsed_eq!("two  spaces", "two spaces");
collapsed_eq!("new\r\nlines", "new\nlines");
collapsed_eq!(" lead \t tail \r", "lead tail");
Commit count: 0

cargo fmt