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

Method allow_invalid_utf8

regex/regex-syntax/src/parser.rs:95–98  ·  view source on GitHub ↗

When enabled, the parser will permit the construction of a regular expression that may match invalid UTF-8. When disabled (the default), the parser is guaranteed to produce an expression that will only ever match valid UTF-8 (otherwise, the parser will return an error). Perhaps surprisingly, when invalid UTF-8 isn't allowed, a negated ASCII word boundary (uttered as `(?-u:\B)` in the concrete sy

(&mut self, yes: bool)

Source from the content-addressed store, hash-verified

93 /// the parser to return an error. Namely, a negated ASCII word boundary
94 /// can result in matching positions that aren't valid UTF-8 boundaries.
95 pub fn allow_invalid_utf8(&mut self, yes: bool) -> &mut ParserBuilder {
96 self.hir.allow_invalid_utf8(yes);
97 self
98 }
99
100 /// Enable verbose mode in the regular expression.
101 ///

Callers 3

cmd_hirFunction · 0.45
parseFunction · 0.45
parseMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected