Skip to main content
Version: 4.0 (next)

Humanizer.IOrdinalizer

IOrdinalizer Interface

Localizes the ordinal form of a number.

public interface IOrdinalizer

Derived
ILongOrdinalizer

Methods

IOrdinalizer.Convert(int, string) Method

Ordinalizes the number using the default grammatical form.

string Convert(int number, string numberString);

Parameters

number System.Int32

The numeric value being ordinalized.

numberString System.String

The cardinal representation of the number.

Returns

System.String
The ordinalized text.

IOrdinalizer.Convert(int, string, GrammaticalGender) Method

Ordinalizes the number using the provided grammatical gender.

string Convert(int number, string numberString, Humanizer.GrammaticalGender gender);

Parameters

number System.Int32

The numeric value being ordinalized.

numberString System.String

The cardinal representation of the number.

gender GrammaticalGender

The grammatical gender to use when the locale requires one.

Returns

System.String
The ordinalized text.

IOrdinalizer.Convert(int, string, GrammaticalGender, WordForm) Method

Ordinalizes the number using the provided grammatical gender and word form.

string Convert(int number, string numberString, Humanizer.GrammaticalGender gender, Humanizer.WordForm wordForm);

Parameters

number System.Int32

The numeric value being ordinalized.

numberString System.String

The cardinal representation of the number.

gender GrammaticalGender

The grammatical gender to use when the locale requires one.

wordForm WordForm

The word form to use when the locale distinguishes abbreviations from full words.

Returns

System.String
The ordinalized text.

IOrdinalizer.Convert(int, string, WordForm) Method

Ordinalizes the number using a locale-specific word form.

string Convert(int number, string numberString, Humanizer.WordForm wordForm);

Parameters

number System.Int32

The numeric value being ordinalized.

numberString System.String

The cardinal representation of the number.

wordForm WordForm

The word form to use when the locale distinguishes abbreviations from full words.

Returns

System.String
The ordinalized text.