pub fn compare(&mut self, string1: &str, string2: &str, max_distance: Option<usize>) -> Option<usize> {
        if max_distance.is_some() {
            return self.distance_comparator.distance2(string1, string2, max_distance.unwrap())
        }
        return self.distance_comparator.distance(string1, string2);
    }
/// <summary>Compare a string to the base string to determine the edit distance,
/// using the previously selected algorithm.</summary>
/// <param name="string2">The string to compare.</param>
/// <param name="maxDistance">The maximum distance allowed.</param>
/// <returns>The edit distance (or -1 if maxDistance exceeded).</returns>
Compare a string to the base string to determine the edit distance,
using the previously selected algorithm.
The string to compare.
The maximum distance allowed.
The edit distance (or -1 if maxDistance exceeded).
Compare a string to the base string to determine the edit distance using the previously selected algorithm . The string to compare . The maximum distance allowed . The edit distance ( or - 1 if maxDistance exceeded ) .
pub fn compare(&mut self, string1: &str, string2: &str, max_distance: Option<usize>) -> Option<usize> {
        if max_distance.is_some() {
            return self.distance_comparator.distance2(string1, string2, max_distance.unwrap())
        }
        return self.distance_comparator.distance(string1, string2);
    }
pub fn compare ( & mut self , string1 : & str , string2 : & str , max_distance : Option < usize > ) -> Option < usize > { if max_distance . is_some ( ) { return self . distance_comparator . distance2 ( string1 , string2 , max_distance . unwrap ( ) ) } return self . distance_comparator . distance ( string1 , string2 ) ; }
<summary>Compare a string to the base string to determine the edit distance,
using the previously selected algorithm.</summary>
<param name="string2">The string to compare.</param>
<param name="maxDistance">The maximum distance allowed.</param>
<returns>The edit distance (or -1 if maxDistance exceeded).</returns>
<summary > Compare a string to the base string to determine the edit distance using the previously selected algorithm . < / summary > <param name = " string2 " > The string to compare . < / param > <param name = " maxDistance " > The maximum distance allowed . < / param > <returns > The edit distance ( or - 1 if maxDistance exceeded ) . < / returns >
&mut self
string1
&str
string2
&str
max_distance
Option<usize>