public class StringFormat
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static StringFormat |
instance |
protected static java.lang.String |
spaceString |
static java.lang.String |
version |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
format(double inValue,
int signification)
Format a double value.
|
static java.lang.String |
getVersion() |
static boolean |
isNumeric(char c)
Function return a boolean whther the incoming
character is a numeric character.
|
static void |
main(java.lang.String[] args)
The Main Body to test the brick.
|
static java.lang.String |
printf(java.lang.String format,
int value)
Format an int value using ANSI-C format string.
|
static java.lang.String |
printf(java.lang.String format,
java.lang.Integer value)
Format an Integer instance using ANSI-C format string.
|
static java.lang.String |
printf(java.lang.String format,
java.lang.String value)
Format a string using ANSI-C format string.
|
public static final java.lang.String version
protected static StringFormat instance
protected static java.lang.String spaceString
public static java.lang.String getVersion()
public static boolean isNumeric(char c)
c
- The character to be checked.public static java.lang.String printf(java.lang.String format, java.lang.String value) throws FwkException
output string C-Format w - parameter l - parameter "Hello, world" %10s 10 0 "Hello, world" %-10s -10 0 " Hello, world" %20s 20 0 "Hello, world " %-20s -20 0 " Hello, wor" %20.10s 20 10 "Hello, wor " %-20.10s -20 10 "Hello, wor" %.10s 0 10
format
- The format string.value
- The string value.FwkException
public static java.lang.String printf(java.lang.String format, java.lang.Integer value)
format
- The format string.value
- The string value.public static java.lang.String printf(java.lang.String format, int value)
format
- The format string.value
- The string value.public static java.lang.String format(double inValue, int signification)
value
- The valuesignification
- The signification.public static void main(java.lang.String[] args)