1 stable release

1.0.2 Jan 13, 2023

#35 in #integer-value

Download history

118 downloads per month

MIT license

16KB
204 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

~150KB