multiparse

Crates.iomultiparse
lib.rsmultiparse
version1.0.0
created_at2025-12-10 14:10:01.70755+00
updated_at2025-12-10 14:20:23.151493+00
descriptionAutomatically parse multiple radices
homepage
repositoryhttps://github.com/JMANN240/multiparse
max_upload_size
id1978107
size5,707
JT Raber (JMANN240)

documentation

README

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.

Commit count: 0

cargo fmt