pub fn from_dna_only_string(dna: &str) -> Vec<DnaString> {
        let mut dna_vector: Vec<DnaString> = Vec::new();
        let mut dna_string = DnaString::new();

        for c in dna.chars() {
            match dna_only_base_to_bits(c as u8) {
                Some(bit) => {
                    dna_string.push(bit);
                }
                None => {
                    if dna_string.len() > 0 {
                        dna_vector.push(dna_string);
                        dna_string = DnaString::new();
                    }
                }
            }
        }
        if dna_string.len() > 0 {
            dna_vector.push(dna_string);
        }

        dna_vector
    }
/// Create a DnaString corresponding to an ACGT-encoded str.
Create a DnaString corresponding to an ACGT-encoded str.
Create a DnaString corresponding to an ACGT - encoded str .
pub fn from_dna_only_string(dna: &str) -> Vec<DnaString> {
        let mut dna_vector: Vec<DnaString> = Vec::new();
        let mut dna_string = DnaString::new();
        for c in dna.chars() {
            match dna_only_base_to_bits(c as u8) {
                Some(bit) => {
                    dna_string.push(bit);
                }
                None => {
                    if dna_string.len() > 0 {
                        dna_vector.push(dna_string);
                        dna_string = DnaString::new();
                    }
                }
            }
        }
        if dna_string.len() > 0 {
            dna_vector.push(dna_string);
        }
        dna_vector
    }
pub fn from_dna_only_string ( dna : & str ) -> Vec < DnaString > { let mut dna_vector : Vec < DnaString > = Vec :: new ( ) ; let mut dna_string = DnaString :: new ( ) ; for c in dna . chars ( ) { match dna_only_base_to_bits ( c as u8 ) { Some ( bit ) => { dna_string . push ( bit ) ; } None => { if dna_string . len ( ) > 0 { dna_vector . push ( dna_string ) ; dna_string = DnaString :: new ( ) ; } } } } if dna_string . len ( ) > 0 { dna_vector . push ( dna_string ) ; } dna_vector }
Create a DnaString corresponding to an ACGT-encoded str.
Create a DnaString corresponding to an ACGT - encoded str .
dna
&str
dna
&str