pub fn one_edit_away(s1: &str, s2: &str) -> bool {
    if s1.len() == s2.len() {
        return one_edit_replace(s1, s2);
    } else if s1.len() + 1 == s2.len() {
        return one_edit_insert(s1, s2);
    } else if s1.len() - 1 == s2.len() {
        return one_edit_insert(s2, s1);
    }

    false
}
/// Compare two strings and see if they match
Compare two strings and see if they match
Compare two strings and see if they match
pub fn one_edit_away(s1: &str, s2: &str) -> bool {
    if s1.len() == s2.len() {
        return one_edit_replace(s1, s2);
    } else if s1.len() + 1 == s2.len() {
        return one_edit_insert(s1, s2);
    } else if s1.len() - 1 == s2.len() {
        return one_edit_insert(s2, s1);
    }
    false
}
pub fn one_edit_away ( s1 : & str , s2 : & str ) -> bool { if s1 . len ( ) == s2 . len ( ) { return one_edit_replace ( s1 , s2 ) ; } else if s1 . len ( ) + 1 == s2 . len ( ) { return one_edit_insert ( s1 , s2 ) ; } else if s1 . len ( ) - 1 == s2 . len ( ) { return one_edit_insert ( s2 , s1 ) ; } false }
Compare two strings and see if they match
Compare two strings and see if they match
s1
&str
s2
&str
s1
&str
s2
&str