public final class UtilMethods extends Object
Constructor and Description |
---|
UtilMethods() |
Modifier and Type | Method and Description |
---|---|
static String |
format(double d,
String format)
Used to format a double to a string.
|
static String |
format(long d,
String format)
Used to format a long to a string.
|
static String |
format(Number d,
String format)
Used to format a number to a string.
|
public static String format(double d, String format)
Used to format a double to a string.
Example usage:
double d = 1.222222 println d.format( '0.00' )
d
- number to formatformat
- the format to usepublic static String format(long d, String format)
Used to format a long to a string.
Example usage:
long d = 1234567890L println d.format( '0,000,000.00' )
d
- number to formatformat
- the format to useCopyright © 2020. All rights reserved.