Crates.io | decline-word |
lib.rs | decline-word |
version | 0.1.2 |
source | src |
created_at | 2023-07-13 20:58:56.954207 |
updated_at | 2023-07-14 07:40:37.734888 |
description | Choose word form based on given number |
homepage | https://github.com/lebe-dev/decline-word |
repository | https://github.com/lebe-dev/decline-word |
max_upload_size | |
id | 915634 |
size | 3,066 |
1. Add dependency:
cargo add decline-word
2. Use:
let value = decline_for_num(12412, &("минута", "минуты", "минут"));
println!("{value}");
let value = decline_for_num(387222, &("рубль", "рубля", "рублей"));
println!("{value}");
Output:
минут
рубля