Skip to content

Use this crate to simplfy Rust's IO scripts, similar to Python. And with an intergated capitalize string method

Notifications You must be signed in to change notification settings

Bohemia-Softwares/io_capitalize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

io_capitalize crate for Rust

This crate will make writing inputs in Rust alot easier as Python.

How to Use:

use io_capitalize::*;

// Import the crate to use.

fn main() {

let mut ask = input_str("How are you? ).to_lowercase;

if ask.contains(good) || ask.contains(nice) || ask.contains(cool) {

    ask = "good".to_string();
    // If you want to reassign your muttable variable, you must convert it to String. (&str aren't compatible.)

    print!("{}? Nice.", ask.capitalize());
}

else {
    print!("OH!");
}

// See how much simple it is? Also it works with other types by: (input_int) both i64 and i32, (input_float) both f64 and f32, (input_bool) for booleans.
// And the capitalize method is integrated, it is a Python equivalent of .capitalize() string method, useful to have though.

}

About

Use this crate to simplfy Rust's IO scripts, similar to Python. And with an intergated capitalize string method

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published