Skip to main content

epics_parse_double_units

Function epics_parse_double_units 

Source
pub fn epics_parse_double_units(
    s: &str,
) -> Result<(f64, &str), ParseDoubleError>
Expand description

C epicsParseDouble(str, to, units) with a NON-NULL units (epicsStdlib.c:149-176): skip leading whitespace, run strtod, reject ERANGE, skip trailing whitespace, and hand back whatever remains instead of refusing it. This is the form store_double_value uses for filter options (chfPlugin.c:273), which is why {"dbnd":{"d":"0.5 V"}} stores 0.5 rather than failing the parse.