string.percent

Syntax string.percent (numerator, denominator, rodPlaces)

Params numerator is a number.

denominator is a number.

rodPlaces is a number, optional, default value is 3.

Action Performs the division, multiplies by 100, and truncates or zero-extends the right-of-decimal part of the result to have the number of places designated by rodPlaces.

Returns A string containing the result of the calculation described above.

Examples string.percent (1, 100, 3)

   » "1.000"

string.percent (1, 1000, 3)

   » "0.100"

string.percent (0.00123, 1000, 6)

   » "0.000123"

Notes This verb is implemented as a script.

Discuss