pub fn null_distance_results(string1: &str, string2: &str, max_distance: usize) -> Option<usize> {
    let gc2 = GraphemeClusters::new(string2);
    if string1 == "" {
        let str2_len = gc2.len();
        if string2 == "" {
            return Some(0);
        } else if str2_len <= max_distance {
            return Some(str2_len);
        }
        return None;
    }
    let gc1 = GraphemeClusters::new(string1);
    let str1_len = gc1.len();
    return if str1_len <= max_distance { Some(str1_len) } else { None };
}
/// <summary>Determines the proper return value of an edit distance function when one or
/// both strings are null.</summary>
Determines the proper return value of an edit distance function when one or
both strings are null.
Determines the proper return value of an edit distance function when one or both strings are null .
pub fn null_distance_results(string1: &str, string2: &str, max_distance: usize) -> Option<usize> {
    let gc2 = GraphemeClusters::new(string2);
    if string1 == "" {
        let str2_len = gc2.len();
        if string2 == "" {
            return Some(0);
        } else if str2_len <= max_distance {
            return Some(str2_len);
        }
        return None;
    }
    let gc1 = GraphemeClusters::new(string1);
    let str1_len = gc1.len();
    return if str1_len <= max_distance { Some(str1_len) } else { None };
}
pub fn null_distance_results ( string1 : & str , string2 : & str , max_distance : usize ) -> Option < usize > { let gc2 = GraphemeClusters :: new ( string2 ) ; if string1 == " " { let str2_len = gc2 . len ( ) ; if string2 == " " { return Some ( 0 ) ; } else if str2_len <= max_distance { return Some ( str2_len ) ; } return None ; } let gc1 = GraphemeClusters :: new ( string1 ) ; let str1_len = gc1 . len ( ) ; return if str1_len <= max_distance { Some ( str1_len ) } else { None } ; }
<summary>Determines the proper return value of an edit distance function when one or
both strings are null.</summary>
<summary > Determines the proper return value of an edit distance function when one or both strings are null . < / summary >
string1
&str
string2
&str
max_distance
usize