From 7fffb6abdd466a993cc285208ea5a1811fc2711d Mon Sep 17 00:00:00 2001 From: Ali Ghahremani Date: Sun, 17 Dec 2023 13:14:15 +0330 Subject: [PATCH] open pr: number_to_words --- Cargo.toml | 2 ++ Makefile | 5 +++++ README.md | 2 +- src/lib.rs | 3 +++ src/number_to_words/mod.rs | 8 ++++++++ 5 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 src/number_to_words/mod.rs diff --git a/Cargo.toml b/Cargo.toml index 520ade3..3ceef6d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,6 +37,7 @@ full = [ "url-fix", "verity-card-number", "phone-number", + "number-to-words", ] add-ordinal-suffix = [] commas = [] @@ -50,6 +51,7 @@ url-fix = ["dep:urlencoding"] verity-card-number = [] phone-number = [] serde = ["dep:serde"] +number-to-words = [] [package.metadata.docs.rs] all-features = true diff --git a/Makefile b/Makefile index 4cc6773..b8ee017 100644 --- a/Makefile +++ b/Makefile @@ -88,3 +88,8 @@ phone-number: @ ls -sh target/debug/*.rlib cargo build --no-default-features --features="phone-number serde" @ ls -sh target/debug/*.rlib + +number-to-words: + @ echo "" + cargo build --no-default-features --features=number-to-words + @ ls -sh target/debug/*.rlib \ No newline at end of file diff --git a/README.md b/README.md index db93c83..b6ffff7 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Rust version of Persian Tools - [x] isPersian - [ ] legalId - [x] nationalId -- [ ] numberToWords +- [-] numberToWords - [ ] numberplate - [x] phoneNumber - [ ] remainingTime diff --git a/src/lib.rs b/src/lib.rs index fc1763e..e343a29 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -45,3 +45,6 @@ pub mod verity_card_number; #[cfg(feature = "phone-number")] pub mod phone_number; + +#[cfg(feature = "number-to-words")] +pub mod number_to_words; diff --git a/src/number_to_words/mod.rs b/src/number_to_words/mod.rs new file mode 100644 index 0000000..7bcd8cc --- /dev/null +++ b/src/number_to_words/mod.rs @@ -0,0 +1,8 @@ +#[cfg(test)] +mod tests { + + #[test] + fn number_to_word_test() { + assert_eq!(1, 1); + } +}