Category talk:Wren-fmt: Difference between revisions
Content deleted Content added
→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 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) {
// 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.
|