Link | integer-asStringOrd |
Author | Brad Lindsay |
Category | Namespace |
Version | 9.x |
License | Public Domain |
Posted | 27 Dec 2011 |
Updated | 28 Dec 2011 |
More by this author... |
The [integer->asStringOrd] returns the ordinal format of an integer.
1->asStringOrd // Returns '1st'
Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
define integer->asStringOrd => { (:11,12,13)->contains(self % 100)? return self->asString + 'th' return self->asString + (:'th','st','nd','rd','th','th','th','th','th','th')->get((self % 10) + 1) }
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft