website logo
ChartHop documentation
Carrot reference
Release notes
Navigate through spaces
ChartHop documentation
Carrot reference
Release notes
⌘K
Getting started
Getting started with Carrot
Operator precedence
Filtering with Carrot
Data categories
Basic Org Information
Compensation
Job Changes
Permissions
Personal
Recruiting
Structure
Time off
Data types
Address
Boolean
Comp
Comp Band
Currency
Date
DateTime
DaysOff
Enum
EnumList
File
Group
Image
Job
List
Money
Name
Number
Null
Percent
Person
PersonList
Shares
StockGrant
String
TimeOff
User
Operators
+ (add)
- (subtract)
* (multiply)
/ (divide)
% (modulus)
&& (and)
|| (or)
if
: (match)
= (equals)
!= (not-equals)
! (not)
> (greater-than)
>= (greater-than-equals)
< (less-than)
<= (less-than-equals)
[ ](array)
. (dot)
? (ternary)
?: (elvis)
Functions
abs()
asOf()
boolean()
compHistory()
compBetween()
costBetween()
date()
day()
daysOffBetween()
diffYears()
diffMonths()
distance()
monthEnd()
formatMoney()
formatRound()
formatNumber()
formatPercent()
formatDate()
grantedShares()
length()
max()
mean()
money()
month()
min()
nextAnniversary()
number()
pluralize()
percent()
random()
round()
roundUp()
roundDown()
string()
subString()
stockPrice()
monthStart()
split()
vestValue()
vestShares()
year()
Aggregators
count{}
max{}
mean{}
min{}
sum{}
Docs powered by archbee 
6min

pluralize()

Given a value of type String, returns that value in plural form.

Syntax

pluralize(number, singular[, plural])

  • number - the specified number of instances of the evaluated string.
  • singular - the singular form of the evaluated string.
  • plural (optional) - the plural form of the evaluated string.
  • Return type: String

Sample usage

pluralize(10, "banana") returns "bananas".

pluralize(1, "address", "addresses") returns "address".

pluralize(10, "address", "addresses") returns "addresses"'.

Supported data types

Input type

Return type

Logic

Number, String

String

If a Number value greater than 1, or less than 1, and a single String value are passed, the String value will be returned with an s appended to it. If a Number value of 1 is passed, the String value will remain in singular form.

Number , String (x2)

String

If a Number value greater than 1, or less than 1, and two String value are passed, including the optional parameter, the second String value will be returned. If a Number value of 1 is passed, the String value will remain in singular form.

Unsupported data types

Null

Unsupported data types return Null.

Updated 07 Dec 2021
Did this page help you?
Yes
No
UP NEXT
percent()
Docs powered by archbee 
TABLE OF CONTENTS
Syntax
Sample usage
Supported data types