@Deprecated
public final class StringParseUtil
extends java.lang.Object
Constructor and Description |
---|
StringParseUtil()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
parseBoolean(java.lang.String s,
boolean d)
Deprecated.
Turns a string into a boolean value and returns a default value if unsuccessful.
|
static int |
parseIfInt(java.lang.String s,
int def)
Deprecated.
|
static int |
parseInt(java.lang.String s,
int def)
Deprecated.
Turns a string into an int and returns a default value if unsuccessful.
|
static int |
parseInt(java.lang.String s,
int def,
int[] lastIdx,
boolean allowNegative)
Deprecated.
Turns a string into an int and returns a default value if unsuccessful.
|
static java.lang.Number |
parseIntRadix(java.lang.String s,
int radix)
Deprecated.
Turns a string into an int using a given radix.
|
static java.lang.Number |
parseNumber(java.lang.String s,
java.lang.Number def)
Deprecated.
Turns a string into a Number and returns a default value if unsuccessful.
|
static java.lang.Number |
parseStrict(java.lang.String s)
Deprecated.
Use Java's "strict parsing" methods Integer.parseInt and Double.parseDouble to parse s "strictly".
|
public static boolean parseBoolean(java.lang.String s, boolean d)
s
- the string to convertd
- the default valuepublic static int parseInt(java.lang.String s, int def)
s
- the string to convertdef
- the default valuepublic static java.lang.Number parseIntRadix(java.lang.String s, int radix)
s
- the string to convertradix
- radix to usepublic static int parseInt(java.lang.String s, int def, int[] lastIdx, boolean allowNegative)
s
- the string to convertdef
- the default valuelastIdx
- sets lastIdx[0] to the index of the last digitallowNegative
- if negative numbers are validpublic static java.lang.Number parseNumber(java.lang.String s, java.lang.Number def)
s
- the string to convertdef
- the default valuepublic static java.lang.Number parseStrict(java.lang.String s)
s
- the string to convertpublic static int parseIfInt(java.lang.String s, int def)