10 releases (5 stable)

1.1.1 Jan 22, 2024
1.1.0 Jan 21, 2024
1.0.2 Oct 8, 2022
1.0.0 Jan 1, 2022
0.1.2 Jul 30, 2020

#63 in Command-line interface

Download history 8644/week @ 2023-11-07 8970/week @ 2023-11-14 9882/week @ 2023-11-21 9555/week @ 2023-11-28 7106/week @ 2023-12-05 14931/week @ 2023-12-12 20102/week @ 2023-12-19 7798/week @ 2023-12-26 17790/week @ 2024-01-02 23147/week @ 2024-01-09 32131/week @ 2024-01-16 29730/week @ 2024-01-23 25157/week @ 2024-01-30 31557/week @ 2024-02-06 33009/week @ 2024-02-13 26716/week @ 2024-02-20

123,267 downloads per month
Used in 22 crates (19 directly)

MIT license

15KB
192 lines

crates.io docs.rs Build Status

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.

lib.rs:

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.

Dependencies

~160KB