selene-lib 0.17.0

A library for linting Lua code. You probably want selene instead.
Documentation
1
2
3
4
5
6
7
8
9
/// Detects whether the amount provided is singular or plural, and returns the correct form of the string
#[inline]
pub fn plural<'a>(amount: usize, singular: &'a str, plural: &'a str) -> &'a str {
    if amount == 1 {
        singular
    } else {
        plural
    }
}