symbol_to_z

Function symbol_to_z 

Source
pub fn symbol_to_z(symbol: &str) -> Option<u32>
Expand description

Atomic number Z from element symbol (case-insensitive for elements Z≥1).

Accepts “U”, “u”, “Fe”, “fe”, etc.

Neutron special case: the neutron symbol "n" (Z=0) is matched case-sensitively. Passing "N" returns Some(7) (Nitrogen), not Z=0.