Crates.io | crook_calculator |
lib.rs | crook_calculator |
version | 0.1.1 |
source | src |
created_at | 2023-08-27 20:54:04.882505 |
updated_at | 2023-08-27 21:14:16.328209 |
description | Provides one function to compute mathematical equations from string slices. |
homepage | |
repository | https://github.com/LucasHazardous/crook_calculator |
max_upload_size | |
id | 956382 |
size | 11,626 |
A package that comes with a library and a binary crate. Library crate provides one function to compute mathematical equations from string slices. Binary crate provides command line interface for this function.
Build and run the binary, then enter an equation like this:
3 * ( ( 2 + 1 - 1 ) ^ 2 ) / 2 - 3.5
Remember about spaces. Any ammount of spaces or any different whitespace characters to separate numbers and operators.
use crook_calculator;
fn main() {
println!("{}", crook_calculator::compute("2 + 2").unwrap());
}