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

Function is_js_space

codegraph-kernel/src/rustlang.rs:1711–1718  ·  view source on GitHub ↗

JS `\s` (WhiteSpace ∪ LineTerminator), which `.replace(/\s+/g, '')` strips: unlike Rust's `char::is_whitespace`, U+FEFF yes and U+0085 no.

(c: char)

Source from the content-addressed store, hash-verified

1709/// JS `\s` (WhiteSpace ∪ LineTerminator), which `.replace(/\s+/g, '')` strips:
1710/// unlike Rust's `char::is_whitespace`, U+FEFF yes and U+0085 no.
1711fn is_js_space(c: char) -> bool {
1712 matches!(
1713 c,
1714 '\t' | '\n' | '\x0B' | '\x0C' | '\r' | ' ' | '\u{00A0}' | '\u{1680}'
1715 | '\u{2000}'..='\u{200A}' | '\u{2028}' | '\u{2029}' | '\u{202F}' | '\u{205F}'
1716 | '\u{3000}' | '\u{FEFF}'
1717 )
1718}
1719
1720/// The receiver chain a method call is written on, when it is fields and
1721/// method calls on `self` or on a name: `self.services.store`,

Callers 1

maybe_capture_fn_refsMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected