Crate chemstring
source ·Expand description
A library for parsing strings into chemical symbols permutations.
§Example
use chemstring::ChemString;
let chem_string = ChemString::parse("seal").unwrap();
assert_eq!(chem_string.results(), vec!["Se Al"]);
let chem_string = ChemString::parse("bichon").unwrap();
let possible_permutation = "Bi C H O N".to_string();
assert!(chem_string.results().contains(&possible_permutation));
Modules§
Structs§
- A
ChemString
is a string that can be written using only chemical symbols. TheChemString
struct has a single field,0
, which is a vector of all the possible chemical symbols permutations that can be formed from the string.