MCPcopy Create free account
hub / github.com/denoland/rust-urlpattern / is_valid_name_codepoint

Function is_valid_name_codepoint

src/tokenizer.rs:337–344  ·  view source on GitHub ↗
(code_point: char, first: bool)

Source from the content-addressed store, hash-verified

335// Ref: https://wicg.github.io/urlpattern/#is-a-valid-name-code-point
336#[inline]
337pub(crate) fn is_valid_name_codepoint(code_point: char, first: bool) -> bool {
338 if first {
339 ID_START.contains(code_point) || matches!(code_point, '$' | '_')
340 } else {
341 ID_CONTINUE.contains(code_point)
342 || matches!(code_point, '$' | '\u{200C}' | '\u{200D}')
343 }
344}

Callers 2

generate_pattern_stringFunction · 0.85
tokenizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected