pub fn apply(&mut self, s1: impl AsRef<[u8]>, s2: impl AsRef<[u8]>) -> f64 {
        let mut b1 = s1.as_ref();
        let mut b2 = s2.as_ref();
        if b1.is_empty() && b2.is_empty() {
            return 1.0;
        }

        if b1.is_empty() || b2.is_empty() {
            return 0.0;
        }

        self.ensure_capacity(b1.len() + b2.len());

        if b1.len() > b2.len() {
            std::mem::swap(&mut b1, &mut b2);
        }
        self.calculate(b1, b2)
    }
/// Match two input strings and produces a score between 0 and 1.
Match two input strings and produces a score between 0 and 1.
Match two input strings and produces a score between 0 and 1 .
pub fn apply(&mut self, s1: impl AsRef<[u8]>, s2: impl AsRef<[u8]>) -> f64 {
        let mut b1 = s1.as_ref();
        let mut b2 = s2.as_ref();
        if b1.is_empty() && b2.is_empty() {
            return 1.0;
        }
        if b1.is_empty() || b2.is_empty() {
            return 0.0;
        }
        self.ensure_capacity(b1.len() + b2.len());
        if b1.len() > b2.len() {
            std::mem::swap(&mut b1, &mut b2);
        }
        self.calculate(b1, b2)
    }
pub fn apply ( & mut self , s1 : impl AsRef < [ u8 ] > , s2 : impl AsRef < [ u8 ] > ) -> f64 { let mut b1 = s1 . as_ref ( ) ; let mut b2 = s2 . as_ref ( ) ; if b1 . is_empty ( ) && b2 . is_empty ( ) { return 1.0 ; } if b1 . is_empty ( ) || b2 . is_empty ( ) { return 0.0 ; } self . ensure_capacity ( b1 . len ( ) + b2 . len ( ) ) ; if b1 . len ( ) > b2 . len ( ) { std :: mem :: swap ( & mut b1 , & mut b2 ) ; } self . calculate ( b1 , b2 ) }
Match two input strings and produces a score between 0 and 1.
Match two input strings and produces a score between 0 and 1 .
&mut self
s1
impl AsRef<[u8]>
s2
impl AsRef<[u8]>
&mut self
s1
impl AsRef<[u8]>
s2
impl AsRef<[u8]>