private bool ParseMagneticSusceptibility(string s, Qualities q) { s = StringEx.RemoveReferences(s); double d; if (DoubleValue.TryParseScientific(s, out d)) { q.MagneticSusceptibility = new UnitValue(d, "cm3/mol"); return(true); } return(false); }
private bool ParseThermalConductivity(string s, Qualities q) { const string UNIT = "W/(m·K)", EST = "est."; ValueQualifier vq = ValueQualifier.None; if (s.StartsWith(EST)) { vq = ValueQualifier.Estimated; s = s.Substring(EST.Length).Trim(); } int n = s.IndexOf(UNIT); if (n > 0) { s = s.Substring(0, n - 1).Trim(); double d; if (DoubleValue.TryParseScientific(s, out d) || UnitValue.TryParse(s, out d)) { q.ThermalConductivity = new UnitValue(d, UNIT, vq); return(true); } } return(false); }