| Crates.io | is_number |
| lib.rs | is_number |
| version | 0.1.1 |
| created_at | 2024-11-17 23:26:12.673874+00 |
| updated_at | 2024-11-17 23:37:31.385688+00 |
| description | Check if a string can be parsed as a number |
| homepage | |
| repository | https://github.com/dotslashbit/is-number-rs |
| max_upload_size | |
| id | 1451598 |
| size | 6,421 |
A Rust library to check if a string represents a valid number.
Add this to your Cargo.toml:
[dependencies]
is_number = "0.1.0"
use is_number::is_number;
fn main() {
assert!(is_number("123"));
assert!(is_number("-123.456"));
assert!(is_number("1.23e-5"));
}