Crates.io | userinput |
lib.rs | userinput |
version | 0.1.5 |
source | src |
created_at | 2020-04-19 22:13:42.32296 |
updated_at | 2020-04-27 17:02:46.078346 |
description | library for checking userinput errors |
homepage | |
repository | https://github.com/carnot-engine/userinput.git |
max_upload_size | |
id | 232052 |
size | 21,734 |
userinput is a simple rust library for checking the error during userinput
fn main() { println!("Enter the usize"); let input = userinput::usize(); println!("input:{} usize:{}",input,type_of(input)); }output: Enter the usize 25 input:25 datatype:usize
syntax : userinput::datatype() //usize,isize,f64,f32,i128,u128,i64,u64,i32,u32,i8,u8,char,string : userinput::type_of(variable_name)
sample: let input = userinput::usize(); let input = userinput::string(); let input = userinput::char();