#first #first-line #cool #starters

easy_adds

A package to make rust simple for starters

2 releases

0.1.1 Jan 2, 2019
0.1.0 Jan 2, 2019

#11 in #first-line

MIT license

11KB
305 lines

Introduction

Easy Adds is a crate which provides simple rust for beginers and schools Rust is not an easy langage for beginers but with this crate they can do cool things without dificulty

For using this library writte this in the first line of your code

extern crate easy_adds;
use easy_adds::*;

Some usefull functions

// Generate a random number between 0 and 1
random_f64()
// NOTE: You can also use random_f32 which return a f32 number instead of a f64 number
// You can also generate a number between two numbers with:
random(-5,5)
// This function returns a i32 between the first and the second number (NOTE: The first number is included but not the second)

// Get an input form the user of the given type ex: input_i64("Type a number: ")
input_<Type>("Mesage to sended to the user")
// Here all the types supported: f32,f64,bool,i8,i16,i32,i64,u8,u16,u32,u64,string
// Note to make a string input: input("Mesage to sended to the user")
// You can also use the try_ statement to get an Option<Type> like:
try_input_<Type>("Mesage to sended to the user")
// This return an option of the given type an this is avaible for all types of the input expect String

Dependencies

~550–780KB
~10K SLoC