Skip to main content

normalize_ws

Function normalize_ws 

Source
fn normalize_ws(s: &str) -> String
Expand description

Collapse every run of ASCII whitespace (spaces, tabs, newlines) to a single space and trim the ends. sysinfo’s proc.cmd() joins argv with single spaces, so a multi-line / multi-space wire command never matches the captured cmdline byte-for-byte; normalizing both sides first makes the substring check robust.