Function rosalind::gc::gc_content [] [src]

pub fn gc_content(dna: &str) -> RosalindResult<f32>

This function calculates gc content of given DNA string

Examples

use rosalind::gc::*;

assert_eq!(gc_content("").unwrap(), 0f32);
assert_eq!(gc_content("AGCTATAG").unwrap(), 37.5f32);