Crates.io | plurr |
lib.rs | plurr |
version | 0.2.1 |
source | src |
created_at | 2021-02-01 07:32:22.576818 |
updated_at | 2021-02-01 07:32:22.576818 |
description | A library for handling plurals/genders/conditionals. |
homepage | |
repository | https://github.com/loctools/plurr/ |
max_upload_size | |
id | 349168 |
size | 33,173 |
A library for handling plurals/genders/conditionals.
Add the plurr
crate to your Cargo.toml file:
[dependencies]
plurr = "0.2.1"
extern crate plurr;
use plurr::Plurr;
let mut p = Plurr::new();
let s = "Delete {N_PLURAL:{N} file|{N} files}?";
p.param("N", "5").format(s); // "Delete 5 files?"