Skip to main content

parse_param_value

Function parse_param_value 

Source
pub fn parse_param_value(info: &ParamInfo, text: &str) -> Option<f64>
Expand description

Inverse of format_param_value for host text_to_value round-trips.

Accepts bare numbers and the unit suffixes format_param_value emits (kHz/Hz, ms/s, dB, %, st, °, pan C/nL/nR). Case- insensitive on ASCII unit suffixes; whitespace around the number is ignored. Returns None when the text is not a known form for info.unit.