Bitap constructor

Bitap(
  1. String pattern, {
  2. required FuzzyOptions options,
})

Instantiates a bitap, given options

Implementation

Bitap(String pattern, {required FuzzyOptions options}) : options = options {
  this.pattern = options.isCaseSensitive ? pattern : pattern.toLowerCase();
  this.pattern =
      options.shouldNormalize ? this.pattern.latinize() : this.pattern;
  if (pattern.length <= options.maxPatternLength) {
    patternAlphabet = pa.patternAlphabet(this.pattern);
  }
}