Macro merge_whitespace::merge_whitespace

source ·
merge_whitespace!() { /* proc-macro */ }
Expand description

This is a procedural macro that removes multiple consecutive whitespaces from a given string literal and replaces them with a single space.

§Example

let output = merge_whitespace!("Hello     World!\r\n      How        are         you?");
assert_eq!(output, "Hello World! How are you?");

§Return

The macro expands to the modified string literal.