FuzzyStrings

Print Friendly, PDF & Email

◷ Reading Time: 1 minute

FlexRule.Extensions.FuzzyStrings

Comparing strings by default can be in two ways:

  1. case-sensitive using == operator
  2. case-insensitive using === operator

The FuzzyStrings extension allows strings be compared based on an approximation percentage.

fuzzyCompare

This function compares two strings and returns the similarity percentage

 fuzzyCompare (str1, str2, method)
Examples
Expression: fuzzyCompare('Mama', 'Mom')
Returns: 0.5
Expression: fuzzyCompare('Mama', 'Mom', 'jw')
Returns: 0.75
Updated on July 9, 2019

Was this article helpful?

Related Articles