decline-word

Crates.iodecline-word
lib.rsdecline-word
version0.1.2
sourcesrc
created_at2023-07-13 20:58:56.954207
updated_at2023-07-14 07:40:37.734888
descriptionChoose word form based on given number
homepagehttps://github.com/lebe-dev/decline-word
repositoryhttps://github.com/lebe-dev/decline-word
max_upload_size
id915634
size3,066
Eugene Lebedev (lebe-dev)

documentation

README

decline word

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:

минут
рубля
Commit count: 10

cargo fmt