Click here to Skip to main content
Click here to Skip to main content
Alternatives (1)

Tagged as

Ordinal suffixes in English for the nth degree

, 13 Jun 2011 CPOL
A short C# method to put the Grammarians in a Good Humor

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

14 Jun 2011
YDaoust
What aboutpublic static string NUMthOF(UInt32 v){ return v.ToString() + // Append the ordinal suffix for the unit digit // unless the ten digit is a one (force 'th') "thstndrdthththththth".Substring(2 * (int)(v / 10 % 10 != 1 ? v % 10 : 0), 2);}?Now all...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

GAMerritt

United States United States
Writer, designer, inventor, musician, observer, and critic with many years of experience in each of these areas. I can do without the approval of "experts" because I believe candid statements and penetrating analysis bring greater rewards than a "pat on the back". And if I have something to say when you're not listening, I tell someone else about it.

| | Privacy | Mobile
Web02 | 2.8.141015.1 | Last Updated 14 Jun 2011
Article Copyright 2011 by GAMerritt
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid