https://github.com/newam/clap-num
clap v3/v4 number parsers
https://github.com/newam/clap-num
clap rust
Last synced: 3 months ago
JSON representation
clap v3/v4 number parsers
- Host: GitHub
- URL: https://github.com/newam/clap-num
- Owner: newAM
- License: mit
- Created: 2020-07-30T02:44:46.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-07T01:51:09.000Z (12 months ago)
- Last Synced: 2025-01-11T04:42:29.868Z (4 months ago)
- Topics: clap, rust
- Language: Rust
- Homepage:
- Size: 34.2 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://crates.io/crates/clap-num)
[](https://docs.rs/clap-num/)
[](https://github.com/newAM/clap-num/actions)# clap-num
clap number parsers.
This crate contains functions to validate and parse numerical values from
strings provided by [clap].* `maybe_hex`
Validates an unsigned integer value that can be base-10 or base-16.
* `maybe_hex_range`
Validates an unsigned integer value that can be base-10 or base-16 within a range.
* `number_range`
Validate a signed or unsigned integer value.
* `si_number`
Validate a signed or unsigned integer value with a metric prefix.
* `si_number_range`
Validate a signed or unsigned integer value with a metric prefix within a range.[clap]: https://github.com/clap-rs/clap