Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

##C#, (削除) 73 (削除ここまで) 163 bytes:

C#, (削除) 73 (削除ここまで) 163 bytes:

Func<string,string>p=System.Data.Entity.Design.PluralizationServices.PluralizationService.CreateService(System.Globalization.CultureInfo.CurrentCulture).Pluralize

Yes, another language with it built-in (although you need to add a reference to System.Data.Entity.Design.dll)

To use:

var words = new[] { "car", "bus", "potato", "knife", "penny", "exception", "wolf", "eye", "decoy", "radio" };
foreach (var word in words)
{
 var plural = p(word);
 Console.Out.WriteLine($"{word} => {plural}");
}

Output:

car => cars
bus => buses
potato => potatoes
knife => knives
penny => pennies
exception => exceptions
wolf => wolves
eye => eyes
decoy => decoys
radio => radios

##C#, (削除) 73 (削除ここまで) 163 bytes:

Func<string,string>p=System.Data.Entity.Design.PluralizationServices.PluralizationService.CreateService(System.Globalization.CultureInfo.CurrentCulture).Pluralize

Yes, another language with it built-in (although you need to add a reference to System.Data.Entity.Design.dll)

To use:

var words = new[] { "car", "bus", "potato", "knife", "penny", "exception", "wolf", "eye", "decoy", "radio" };
foreach (var word in words)
{
 var plural = p(word);
 Console.Out.WriteLine($"{word} => {plural}");
}

Output:

car => cars
bus => buses
potato => potatoes
knife => knives
penny => pennies
exception => exceptions
wolf => wolves
eye => eyes
decoy => decoys
radio => radios

C#, (削除) 73 (削除ここまで) 163 bytes:

Func<string,string>p=System.Data.Entity.Design.PluralizationServices.PluralizationService.CreateService(System.Globalization.CultureInfo.CurrentCulture).Pluralize

Yes, another language with it built-in (although you need to add a reference to System.Data.Entity.Design.dll)

To use:

var words = new[] { "car", "bus", "potato", "knife", "penny", "exception", "wolf", "eye", "decoy", "radio" };
foreach (var word in words)
{
 var plural = p(word);
 Console.Out.WriteLine($"{word} => {plural}");
}

Output:

car => cars
bus => buses
potato => potatoes
knife => knives
penny => pennies
exception => exceptions
wolf => wolves
eye => eyes
decoy => decoys
radio => radios
added 35 characters in body
Source Link

##C#, 73(削除) 73 (削除ここまで) 163 bytes:

Func<string,string>p=System.Data.Entity.Design.PluralizationServices.PluralizationService.CreateService(System.Globalization.CultureInfo.CurrentCulture).Pluralize;Pluralize

Yes, another language with it built-in (although you need to add a reference to System.Data.Entity.DesignSystem.Data.Entity.Design.dll)

To use:

var words = new[] { "car", "bus", "potato", "knife", "penny", "exception", "wolf", "eye", "decoy", "radio" };
foreach (var word in words)
{
 var plural = PluralizationService.CreateService(CultureInfo.CurrentCulture).Pluralizep(word);
 Console.Out.WriteLine($"{word} => {plural}");
}

Output:

car => cars
bus => buses
potato => potatoes
knife => knives
penny => pennies
exception => exceptions
wolf => wolves
eye => eyes
decoy => decoys
radio => radios

##C#, 73 bytes:

PluralizationService.CreateService(CultureInfo.CurrentCulture).Pluralize;

Yes, another language with it built-in (although you need to add a reference to System.Data.Entity.Design)

To use:

var words = new[] { "car", "bus", "potato", "knife", "penny", "exception", "wolf", "eye", "decoy", "radio" };
foreach (var word in words)
{
 var plural = PluralizationService.CreateService(CultureInfo.CurrentCulture).Pluralize(word);
 Console.Out.WriteLine($"{word} => {plural}");
}

Output:

car => cars
bus => buses
potato => potatoes
knife => knives
penny => pennies
exception => exceptions
wolf => wolves
eye => eyes
decoy => decoys
radio => radios

##C#, (削除) 73 (削除ここまで) 163 bytes:

Func<string,string>p=System.Data.Entity.Design.PluralizationServices.PluralizationService.CreateService(System.Globalization.CultureInfo.CurrentCulture).Pluralize

Yes, another language with it built-in (although you need to add a reference to System.Data.Entity.Design.dll)

To use:

var words = new[] { "car", "bus", "potato", "knife", "penny", "exception", "wolf", "eye", "decoy", "radio" };
foreach (var word in words)
{
 var plural = p(word);
 Console.Out.WriteLine($"{word} => {plural}");
}

Output:

car => cars
bus => buses
potato => potatoes
knife => knives
penny => pennies
exception => exceptions
wolf => wolves
eye => eyes
decoy => decoys
radio => radios
added 310 characters in body
Source Link

##C#, 73 bytes:

PluralizationService.CreateService(CultureInfo.CurrentCulture).Pluralize;

Yes, another language with it built-in (although you need to add a reference to System.Data.Entity.Design)

To use:

var words = new[] { "car", "bus", "potato", "knife", "penny", "exception", "wolf", "eye", "decoy", "radio" };
foreach (var word in words)
{
 var plural = PluralizationService.CreateService(CultureInfo.CurrentCulture).Pluralize(word);
 Console.Out.WriteLine($"{word} => {plural}");
}

Output:

car => cars
bus => buses
potato => potatoes
knife => knives
penny => pennies
exception => exceptions
wolf => wolves
eye => eyes
decoy => decoys
radio => radios

##C#, 73 bytes:

PluralizationService.CreateService(CultureInfo.CurrentCulture).Pluralize;

Yes, another language with it built-in.

To use:

var words = new[] { "car", "bus", "potato", "knife", "penny", "exception", "wolf", "eye", "decoy", "radio" };
foreach (var word in words)
{
 var plural = PluralizationService.CreateService(CultureInfo.CurrentCulture).Pluralize(word);
 Console.Out.WriteLine($"{word} => {plural}");
}

##C#, 73 bytes:

PluralizationService.CreateService(CultureInfo.CurrentCulture).Pluralize;

Yes, another language with it built-in (although you need to add a reference to System.Data.Entity.Design)

To use:

var words = new[] { "car", "bus", "potato", "knife", "penny", "exception", "wolf", "eye", "decoy", "radio" };
foreach (var word in words)
{
 var plural = PluralizationService.CreateService(CultureInfo.CurrentCulture).Pluralize(word);
 Console.Out.WriteLine($"{word} => {plural}");
}

Output:

car => cars
bus => buses
potato => potatoes
knife => knives
penny => pennies
exception => exceptions
wolf => wolves
eye => eyes
decoy => decoys
radio => radios
added 336 characters in body
Source Link
Loading
Source Link
Loading

AltStyle によって変換されたページ (->オリジナル) /