Crates.io | atomio |
lib.rs | atomio |
version | 0.1.0 |
source | src |
created_at | 2022-07-09 09:07:55.61391 |
updated_at | 2022-07-09 09:07:55.61391 |
description | Crate to parse chemical formula |
homepage | https://github.com/DevHyperCoder/atomio |
repository | https://github.com/DevHyperCoder/atomio |
max_upload_size | |
id | 622404 |
size | 17,942 |
Parse chemical formula like CH4
, Al2(SO4)3
, K2Cr2O7
etc.
Usage is simple:
use atomio::{parser::Parsed,element_group::Unit};
let parsed = Parsed::from_str("CH4");
assert!(parsed.root_group, Unit::ElementGroup {count:1, units: vec![
Unit::Element { count: 1, symbol: "C".into() },
Unit::Element { count: 4, symbol: "H".into() }
]})
Pull Requests and Issues are accepted.
atomio
is licensed under the MIT License. Our copy of MIT License can be found here