When enabled, translation will permit the construction of a regular expression that may match invalid UTF-8. When disabled (the default), the translator is guaranteed to produce an expression that will only ever match valid UTF-8 (otherwise, the translator will return an error). Perhaps surprisingly, when invalid UTF-8 isn't allowed, a negated ASCII word boundary (uttered as `(?-u:\B)` in the co
(
&mut self,
yes: bool,
)
| 64 | /// the parser to return an error. Namely, a negated ASCII word boundary |
| 65 | /// can result in matching positions that aren't valid UTF-8 boundaries. |
| 66 | pub fn allow_invalid_utf8( |
| 67 | &mut self, |
| 68 | yes: bool, |
| 69 | ) -> &mut TranslatorBuilder { |
| 70 | self.allow_invalid_utf8 = yes; |
| 71 | self |
| 72 | } |
| 73 | |
| 74 | /// Enable or disable the case insensitive flag (`i`) by default. |
| 75 | pub fn case_insensitive(&mut self, yes: bool) -> &mut TranslatorBuilder { |
no outgoing calls
no test coverage detected