a rust Library contains functions for dealing with numbers without converting them to string

alimiracle 3e16369554 fix count %!s(int64=2) %!d(string=hai) anos
src 3e16369554 fix count %!s(int64=2) %!d(string=hai) anos
.gitignore f8ff895ecd 1.0 %!s(int64=3) %!d(string=hai) anos
Cargo.toml 81a5fa8685 GPL %!s(int64=3) %!d(string=hai) anos
README.md 6ff4504d16 fix README %!s(int64=3) %!d(string=hai) anos
gpl-3.0.txt f8ff895ecd 1.0 %!s(int64=3) %!d(string=hai) anos

README.md

rust_digits

this is rust Library contains functions for dealing with numbers without converting them to string

Functions:


pub fn min_digit(mut n: i32) -> i32 // min digit in the number

pub fn max_digit(mut n: i32) -> i32 // max digit in the number

pub fn replace_digit(mut n: i32, replaced: i32, replace_with: i32) -> i32 // replace digit in number

pub fn remove_n(mut n: i32, removed: i32) -> i32 //remove digit from number

pub fn cat_rite(mut n: i32, cat: i32) -> i32 // remove digit in rite in the number

pub fn cat_left(mut n: i32, cat: i32) -> i32 // remove digit in left in the number

pub fn add_digit(mut n: i32, digit: i32) -> i32 // add digit to number

pub fn count_n(mut n: i32) -> i32 // count the digits in the number

pub fn last_digit(mut n: i32) -> i32 // last digit in the number

pub fn first_digit(mut n: i32) -> i32 // last digit in the number

pub fn reverse_n(mut n: i32) -> i32 // reverse the number

Install

Add the following line to your Cargo.toml file:

rust_digits = "1.0.0"