pluralpattern(
VALUE
)
The pluralpattern( function converts a number to text using a pattern, making adjustments for pluralization.
Parameters
This function has one parameter:
value – the number to convert.
Description
This function converts a number to text using a pattern, much like the pattern( function. However, this function also makes custom adjustments for pluralization.
pluralpattern(1,"# train~ are ready to go.") ☞ 1 train is ready to go.
pluralpattern(2,"# train~ are ready to go.") ☞ 2 trains are ready to go.
This function understands three pairs of plural/singular words: are/is, have/has, and people/person. Be sure to use the plural form in the pattern. If the value is 1, the function will convert to the singular form of the word, as shown in the examples above.
See Also
- alphabeticnumber( -- converts a number into letters: A, B, C, etc.
- asc( -- converts the first character of a text string into a number from 0 to 65535 based on Unicode encoding.
- bigendianbinaryvalue( -- converts big endian binary data (a byte, word, or longword) into an unsigned number (see Binary Data).
- binarytotext( -- converts binary data into text, optionally using a specified encoding.
- binaryvalue( -- converts binary data (a byte, word, longword, or longlongword) into a number (see Binary Data).
- booleanvalue( -- converts a numeric or text value to Boolean (true/false).
- boolstr( -- converts a Boolean value to text, either `"true"` or `"false"`.
- bytepattern( -- converts a byte count to text: 543 Bytes, 543 Kb, 123 Mb, 3.2 Gb
- chr( -- converts a number into a single character of text, based on Unicode encoding.
- commalist( -- converts a text array (see Text Arrays) into an English list, with items separated by a comma and a space, except for the last two items which are separated by the word *and* and spaces.
- commastr( -- converts a number to text, with a comma every third digit. The number is converted as an integer, with no decimal point.
- completedatestr( -- converts a date to text, spelling out the month and including the day of the week.
- custompluralpattern( -- converts a number to text using a pattern, making customizable adjustments for pluralization.
- datestr( -- converts a date to text using format *mm/dd/yy*.
- daystr( -- converts a date to the day of the week (for example *Sunday*).
- dollarsandcents( -- converts a number to text formatted as dollars and cents.
- emojicheats( -- abbreviates any emojis with "emoji cheat" codes.
- encodeurlfragment( -- encodes text so that it can be used in the fragment portion of a URL (the portion after the # symbol).
- encodeurlhost( -- encodes text so that it can be used in the host portion of a URL (for example www.host.com).
- encodeurlpassword( -- encodes text so that it can be used in the password portion of a URL.
- encodeurlpath( -- encodes text so that it can be used in the path portion of a URL (the portion after the host name, but before any ? symbol).
- encodeurlquery( -- encodes text so that it can be used in the query portion of a URL (the portion after the ? symbol).
- encodeurluser( -- encodes text so that it can be used in the user name portion of a URL.
- eurodatestr( -- converts a date to text in European format.
- expandemojis( -- expands any "emoji cheat" abbreviations into the actual emojis.
- formatphone( -- formats a US phone number using the standard *(aaa) nnn-nnnn* format.
- hex( -- converts a text item containing a hexadecimal number into a standard number (decimal).
- hexbyte( -- converts a limited range of decimal numbers to a two-digit hexadecimal number expressed as a text string.
- hexlong( -- converts a decimal number to an eight-digit hexadecimal number expressed as a text string
- hexstr( -- converts a number to text formatted as a hexadecimal number.
- hextobinary( -- converts a sequence of hexadecimal digits into a raw binary data value.
- hexword( -- converts a decimal number to a four-digit hexadecimal number expressed as a text string.
- importcell( -- returns one cell of imported data.
- info("defaultfloatformat") -- returns the default format for converting floating point numbers to text.
- length( -- counts the number of characters in a text value (also called a string).
- littleendianbinaryvalue( -- converts little endian binary data (a byte, word, longword, or longlongword) into an unsigned number (see Binary Data).
- longdatestr( -- converts a date to text by spelling out the month.
- longtimestr( -- converts a number to text in am/pm time format, including seconds.
- money( -- converts a number to text, formatted as money.
- nth( -- converts a number into an ordinal.
- Numeric Patterns -- control how a number is displayed or converted to text.
- pattern( -- converts a number into text using a pattern.
- places( -- converts a number to text with a specific number of places after the decimal point.
- pointsval( -- converts a dimension to points (possibly from inches or centimeters).
- radix( -- converts a text item containing a number in a radix between 2 and 36 into a decimal number.
- radixstr( -- converts a number into a text item containing the equivalent number in a radix between 2 and 36.
- scientificnotation( -- converts a number to text, formatted in scientific notation.
- setdefaultfloatformat -- sets the default format for converting floating point values to text (unsupported).
- signedbinaryvalue( -- converts binary data (a byte, word, longword, or longlongword) into a signed number (see Binary Data).
- str( -- converts a number into text, with no formatting.
- superdatepattern( -- converts a number containing a superdate to text, allowing you to specify the patterns for both the date and the time conversion to text.
- superdatesecondsstr( -- converts a number containing a superdate to text, including the seconds.
- superdatestr( -- converts a number containing a superdate (date + time) to text.
- texttobinary( -- converts text into binary data, optionally using a specified encoding.
- timestr( -- converts a number to text in am/pm time format.
- val( -- converts text into a number.
- zbpattern( -- converts a number to text using a pattern, but returns empty text if the number is zero.
History
10.0 | No Change | Carried over from Panorama 6.0 |