Skip to main content
Version: 2.11.10

Humanizer.OrdinalizeExtensions

OrdinalizeExtensions Class​

Ordinalize extensions

public static class OrdinalizeExtensions

Inheritance System.Object → OrdinalizeExtensions

Methods​

OrdinalizeExtensions.Ordinalize(this int) Method​

Turns a number into an ordinal number used to denote the position in an ordered sequence such as 1st, 2nd, 3rd, 4th.

public static string Ordinalize(this int number);

Parameters​

number System.Int32

The number to be ordinalized

Returns​

System.String

OrdinalizeExtensions.Ordinalize(this int, GrammaticalGender) Method​

Turns a number into an ordinal number used to denote the position in an ordered sequence such as 1st, 2nd, 3rd, 4th. Gender for Brazilian Portuguese locale 1.Ordinalize(GrammaticalGender.Masculine) -> "1º" 1.Ordinalize(GrammaticalGender.Feminine) -> "1ª"

public static string Ordinalize(this int number, Humanizer.GrammaticalGender gender);

Parameters​

number System.Int32

The number to be ordinalized

gender GrammaticalGender

The grammatical gender to use for output words

Returns​

System.String

OrdinalizeExtensions.Ordinalize(this int, GrammaticalGender, CultureInfo) Method​

Turns a number into an ordinal number used to denote the position in an ordered sequence such as 1st, 2nd, 3rd, 4th. Gender for Brazilian Portuguese locale 1.Ordinalize(GrammaticalGender.Masculine) -> "1º" 1.Ordinalize(GrammaticalGender.Feminine) -> "1ª"

public static string Ordinalize(this int number, Humanizer.GrammaticalGender gender, System.Globalization.CultureInfo culture);

Parameters​

number System.Int32

The number to be ordinalized

gender GrammaticalGender

The grammatical gender to use for output words

culture System.Globalization.CultureInfo

Culture to use. If null, current thread's UI culture is used.

Returns​

System.String

OrdinalizeExtensions.Ordinalize(this int, CultureInfo) Method​

Turns a number into an ordinal number used to denote the position in an ordered sequence such as 1st, 2nd, 3rd, 4th.

public static string Ordinalize(this int number, System.Globalization.CultureInfo culture);

Parameters​

number System.Int32

The number to be ordinalized

culture System.Globalization.CultureInfo

Culture to use. If null, current thread's UI culture is used.

Returns​

System.String

OrdinalizeExtensions.Ordinalize(this string) Method​

Turns a number into an ordinal string used to denote the position in an ordered sequence such as 1st, 2nd, 3rd, 4th.

public static string Ordinalize(this string numberString);

Parameters​

numberString System.String

The number, in string, to be ordinalized

Returns​

System.String

OrdinalizeExtensions.Ordinalize(this string, GrammaticalGender) Method​

Turns a number into an ordinal string used to denote the position in an ordered sequence such as 1st, 2nd, 3rd, 4th. Gender for Brazilian Portuguese locale "1".Ordinalize(GrammaticalGender.Masculine) -> "1º" "1".Ordinalize(GrammaticalGender.Feminine) -> "1ª"

public static string Ordinalize(this string numberString, Humanizer.GrammaticalGender gender);

Parameters​

numberString System.String

The number, in string, to be ordinalized

gender GrammaticalGender

The grammatical gender to use for output words

Returns​

System.String

OrdinalizeExtensions.Ordinalize(this string, GrammaticalGender, CultureInfo) Method​

Turns a number into an ordinal string used to denote the position in an ordered sequence such as 1st, 2nd, 3rd, 4th. Gender for Brazilian Portuguese locale "1".Ordinalize(GrammaticalGender.Masculine) -> "1º" "1".Ordinalize(GrammaticalGender.Feminine) -> "1ª"

public static string Ordinalize(this string numberString, Humanizer.GrammaticalGender gender, System.Globalization.CultureInfo culture);

Parameters​

numberString System.String

The number, in string, to be ordinalized

gender GrammaticalGender

The grammatical gender to use for output words

culture System.Globalization.CultureInfo

Culture to use. If null, current thread's UI culture is used.

Returns​

System.String

OrdinalizeExtensions.Ordinalize(this string, CultureInfo) Method​

Turns a number into an ordinal string used to denote the position in an ordered sequence such as 1st, 2nd, 3rd, 4th.

public static string Ordinalize(this string numberString, System.Globalization.CultureInfo culture);

Parameters​

numberString System.String

The number, in string, to be ordinalized

culture System.Globalization.CultureInfo

Culture to use. If null, current thread's UI culture is used.

Returns​

System.String