multiparse 1.0.0

Automatically parse multiple radices
Documentation
  • Coverage
  • 0%
    0 out of 3 items documented0 out of 2 items with examples
  • Size
  • Source code size: 5.7 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 32.8 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • JMANN240/multiparse
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • JMANN240

multiparse

Automatically parse multiple radices

Usage

Have you ever wanted to take user input of an arbitrary radix? Well now you can!

"73".multiparse::<u8>()         // -> Ok(73)
"0b1001001".multiparse::<u8>()  // -> Ok(73)
"0o111".multiparse::<u8>()      // -> Ok(73)
"0x49".multiparse::<u8>()       // -> Ok(73)

Simply bring the Multiparse trait into scope:

use multiparse::Multiparse;

And then call the multiparse method anywhere that you could call parse.

The Multiparse trait is implemented for Deref<Target = str>, so it should work on everything that you would expect.