C# Class TextHelper.Pluralizer

显示文件 Open project: tylermercier/TextHelper

Public Methods

Method Description
Pluralize ( this text, int count, string plural = null ) : string

Attempts to pluralize the singular word unless count is 1.

Method Details

Pluralize() public static method

Attempts to pluralize the singular word unless count is 1.
public static Pluralize ( this text, int count, string plural = null ) : string
text this
count int The number of things
plural string If plural is supplied, it will use that when count is > 1, otherwise it will add an 's' to the end
return string