MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / is_js_space

Function is_js_space

codegraph-kernel/src/swift.rs:101–108  ·  view source on GitHub ↗

JS `\s` for the chained-call inner-callee strip (`.replace(/\s+/g, '')`).

(c: char)

Source from the content-addressed store, hash-verified

99
100/// JS `\s` for the chained-call inner-callee strip (`.replace(/\s+/g, '')`).
101fn is_js_space(c: char) -> bool {
102 matches!(
103 c,
104 '\t' | '\n' | '\x0B' | '\x0C' | '\r' | ' ' | '\u{00A0}' | '\u{1680}'
105 | '\u{2000}'..='\u{200A}' | '\u{2028}' | '\u{2029}' | '\u{202F}' | '\u{205F}'
106 | '\u{3000}' | '\u{FEFF}'
107 )
108}
109fn strip_js_ws(s: &str) -> String {
110 s.chars().filter(|c| !is_js_space(*c)).collect()
111}

Callers 1

strip_js_wsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected