TextSyntax constructor

TextSyntax(
  1. String pattern, {
  2. String sub = '',
  3. int? startCharacter,
})

Create a new TextSyntax which matches text on pattern.

If sub is passed, it is used as a simple replacement for pattern. If startCharacter is passed, it is used as a pre-matching check which is faster than matching against pattern.

Implementation

TextSyntax(String pattern, {String sub = '', int? startCharacter})
    : substitute = sub,
      super(pattern, startCharacter: startCharacter);