MCPcopy Create free account
hub / github.com/davidblewett/rure-python / hir_class

Function hir_class

regex/regex-syntax/src/unicode.rs:279–285  ·  view source on GitHub ↗

Build a Unicode HIR class from a sequence of Unicode scalar value ranges.

(ranges: &[(char, char)])

Source from the content-addressed store, hash-verified

277
278/// Build a Unicode HIR class from a sequence of Unicode scalar value ranges.
279pub fn hir_class(ranges: &[(char, char)]) -> hir::ClassUnicode {
280 let hir_ranges: Vec<hir::ClassUnicodeRange> = ranges
281 .iter()
282 .map(|&(s, e)| hir::ClassUnicodeRange::new(s, e))
283 .collect();
284 hir::ClassUnicode::new(hir_ranges)
285}
286
287fn canonical_prop(normalized_name: &str) -> Option<&'static str> {
288 ucd_util::canonical_property_name(PROPERTY_NAMES, normalized_name)

Callers 3

classFunction · 0.85
hir_uclass_perl_wordFunction · 0.85

Calls 2

mapMethod · 0.80
iterMethod · 0.45

Tested by

no test coverage detected