Skip to content

Toro Cloud Dev Center


NumberFunctions

Number class contains a series of functions that help you deal with numbers (e.g. conversion, formatting). This class is based on Apache Common's org.apache.commons.lang3.math.NumberUtils class. These functions can be used in Gloop and Groovy. Below are some sample usages:

Sample service showing how to use the `Number` functions

1
2
assert 3.14159265.format('000.000').equals('003.142')
assert '77345993'.toLong() == 77345993L