startsWithSimilarity property

double startsWithSimilarity

Compares the starting charcters of the String with that of other, limiting the comparison to a substring of this or other that is the shorter of this.length or other.length. ///

  • returns 1.0 if the two strings are the same;
  • returns 0.0 if the two strings do not start with the same character;
  • returns 0.0 if either of the strings are empty, unless both are empty (equal);
  • returns the edit distance between the starting characters in all other cases.

The two strings are converted to lower-case and trimmed for the comparison.

Not case sensitive.

Implementation

double get startsWithSimilarity;