| Crates.io | multiparse |
| lib.rs | multiparse |
| version | 1.0.0 |
| created_at | 2025-12-10 14:10:01.70755+00 |
| updated_at | 2025-12-10 14:20:23.151493+00 |
| description | Automatically parse multiple radices |
| homepage | |
| repository | https://github.com/JMANN240/multiparse |
| max_upload_size | |
| id | 1978107 |
| size | 5,707 |
Automatically parse multiple radices
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.