pub fn ordinal_abbreviation(value: i64, plural: bool) -> &'static strExpand description
The letters written after a number to make it an ordinal, st, nd,
rd or th, with an s after all but st for plural: music21’s
ordinalAbbreviation.
use music21::common::numbertools::ordinal_abbreviation;
assert_eq!(ordinal_abbreviation(3, false), "rd");
assert_eq!(ordinal_abbreviation(12, false), "th");
assert_eq!(ordinal_abbreviation(255, true), "ths");