Function voca_rs::query::is_numeric

source ·
pub fn is_numeric(subject: &str) -> bool
Expand description

Checks whether subject is numeric.

Arguments

  • subject - The string to verify.

Example

use voca_rs::*;
query::is_numeric("350");
// => true
query::is_numeric("-20.5");
// => true
query::is_numeric("0xFF");
// => true
query::is_numeric("1.5E+2");
// => true
query::is_numeric("five");
// => false
use voca_rs::Voca;
"350"._is_numeric();
// => true