JS `\s` for the #750 inner-callee strip.
(c: char)
| 76 | |
| 77 | /// JS `\s` for the #750 inner-callee strip. |
| 78 | fn is_js_space(c: char) -> bool { |
| 79 | matches!( |
| 80 | c, |
| 81 | '\t' | '\n' | '\x0B' | '\x0C' | '\r' | ' ' | '\u{00A0}' | '\u{1680}' |
| 82 | | '\u{2000}'..='\u{200A}' | '\u{2028}' | '\u{2029}' | '\u{202F}' | '\u{205F}' |
| 83 | | '\u{3000}' | '\u{FEFF}' |
| 84 | ) |
| 85 | } |
| 86 | fn strip_js_ws(s: &str) -> String { |
| 87 | s.chars().filter(|c| !is_js_space(*c)).collect() |
| 88 | } |