Category talk:Wren-fmt: Difference between revisions

→‎Source code: Made plural format more versatile.
(→‎Source code: Added fraction and plural formats.)
(→‎Source code: Made plural format more versatile.)
Line 418:
static F(w, f) { Fmt.s(w, Conv.fraction(f[0], f[1])) }
 
// Applies the 's' format to the plural of l[1] depending on l[0] and, if present, l[2] where 'l' is a two element list.
// two or three element list. Forms the plural by just adding "s" to l[1] if 'l' is a two element list.
static P(w, l) { Fmt.s(w, Conv.plural(l[0], l[1], l.count == 2 ? l[1] + "s" : l[2])) }
 
// Pads a number 'n' with leading spaces to a minimum width 'w' and a precision of 'p' decimal places.
// Precision is restricted to 14 places though entering a higher figure is not an error.
9,487

edits