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