Method Difference
Difference(String, String)
Returns the number of characters in the two encoded strings that are the same. This return value ranges from 0 to the length of the shortest encoded string: 0 indicates little or no similarity, and 4 out of 4 (for example) indicates strong similarity or identical values. For refined Soundex, the return value can be greater than 4.
See: MS T-SQL DIFFERENCE
since 1.3
Declaration
public virtual int Difference(string s1, string s2)
Parameters
Type | Name | Description |
---|---|---|
System.String | s1 | A string that will be encoded and compared. |
System.String | s2 | A string that will be encoded and compared. |
Returns
Type | Description |
---|---|
System.Int32 | The number of characters in the two encoded strings that are the same from 0 to to the length of the shortest encoded string. |
See Also
Lucene.Net.Analysis.Phonetic.Language.SoundexUtils.Difference(Lucene.Net.Analysis.Phonetic.Language.IStringEncoder,System.String,System.String)