Trait string_patterns::IsNumeric
source · pub trait IsNumeric {
// Required method
fn is_numeric(&self) -> bool;
}
Expand description
Method to check if the string may be parsed to an integer or float
Required Methods§
sourcefn is_numeric(&self) -> bool
fn is_numeric(&self) -> bool
strict check on a numeric string before using .parse::
Implementations on Foreign Types§
source§impl IsNumeric for str
impl IsNumeric for str
Implementation for &str / String
source§fn is_numeric(&self) -> bool
fn is_numeric(&self) -> bool
Check if the string may be parsed to a number This is a now a strict regex-free check Use trim() or correct_numeric_string() first for looser number validation