Show the crate…

2 stable releases

1.0.1 Aug 13, 2022

MIT license

8KB
137 lines

CS50 Library for Rust

Download

Crates

Add the following line to your Cargo.toml file:

cs50 = "1.0.0"

Usage

fn main() {
    let var_char = cs50::get_char("Prompt: ").unwrap();

    let var_bool = cs50::get_bool("Prompt: ").unwrap();

    let var_i8 = cs50::get_i8("Prompt: ").unwrap();

    let var_i16 = cs50::get_i16("Prompt: ").unwrap();

    let var_i32 = cs50::get_i32("Prompt: ").unwrap();

    let var_i64 = cs50::get_i64("Prompt: ").unwrap();

    let var_i128 = cs50::get_i128("Prompt: ").unwrap();

    let var_u8 = cs50::get_u8("Prompt: ").unwrap();

    let var_u16 = cs50::get_u16("Prompt: ").unwrap();

    let var_u32 = cs50::get_u32("Prompt: ").unwrap();

    let var_u64 = cs50::get_u64("Prompt: ").unwrap();

    let var_u128 = cs50::get_u128("Prompt: ").unwrap();

    let var_f32 = cs50::get_f32("Prompt: ").unwrap();

    let var_f64 = cs50::get_f64("Prompt: ").unwrap();

    let var_isize = cs50::get_isize("Prompt: ").unwrap();

    let var_usize = cs50::get_usize("Prompt: ").unwrap();

    let var_string = cs50::get_string("Prompt: ").unwrap();
}

License

This repo is released under the MIT.

No runtime deps