Skip to main content

is_numeric_like

Function is_numeric_like 

Source
pub fn is_numeric_like(s: &str) -> bool
Expand description

Return true if s looks like a number, for Align::Auto.

Rule: take the first whitespace-separated token and try to parse it as f64. For example, "57 ms" -> "57" -> true; "失败" -> false; "-3.14" -> true.