Skip to content
brendanjerwin edited this page Aug 27, 2010 · 5 revisions

inflector_extension provides a nice set of extension methods offering tons of useful inflections of various types. Strings, Ints, Decimals, etc.

Usage

  1. Install it :: [nu install inflector_extension] 1
  2. Reference it :: The extension classes are in the global namespace so you don't need any usings before they are available.
  3. Use it :: "string".InflectTo() or 1.InflectTo() or, for a real blast: 637849590678.InflectTo().Phrase

See the specs for example usages.


In case you are wondering, that big-ass number turns into: "Six Hundred and Thirty Seven Billion, Eight Hundred and Forty Nine Million, Five Hundred and Ninety Thousand, Six Hundred and Seventy Eight"

Clone this wiki locally