JRUtils - Numbers

by Lummox JR
Helpful procs for using numbers in text [More]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://LummoxJR.jruNumbers##version=0

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:


Version 1.0
Date added: Aug 20 2010
Last updated: Aug 21 2010
2 fans
The Numbers library provides a suite of procs that are useful for times when you want to use numbers in text output without spitting out just the raw number itself. The following operations are all supported:

Pluralization: Like a smarter version of the \s macro, you can easily convert most English words to their plural form.

Commafication: Commas can be added to numbers for classier display.

Text conversion: Whole numbers can be converted to their spelled-out form; this includes the ordinal (-th) form as well.

Leading zeros or spaces: A useful proc is included for adding leading characters when displaying a number.

In addition, most of the above routines are available in versions that can parse a larger block of text.