-
Notifications
You must be signed in to change notification settings - Fork 2
Home
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.
- Install it :: [
nu install inflector_extension
] 1 - Reference it :: The extension classes are in the global namespace so you don't need any
usings
before they are available. - Use it ::
"string".InflectTo()
or1.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"