binary-helper

Crates.iobinary-helper
lib.rsbinary-helper
version0.2.3
sourcesrc
created_at2022-10-20 18:03:39.969465
updated_at2022-10-21 12:49:44.265719
descriptionA simple binary conversion crate
homepage
repository
max_upload_size
id692774
size4,838
(EBSmash)

documentation

README

Binary Helper

This crate serves 2 purposes:

1: converting a binary number to a base 10 number

2: converting a base 10 number to a binary number

Example

fn is_10_binary_check(x) -> String {
    let result = dec2binary(x,3);
    if result == "0001010"{
        "X is 10 (0001010 in binary)!".to_string()
    }
}
Commit count: 0

cargo fmt