Numbers
object Numbers
Value members
Concrete methods
Checks whether the String
contains only digit characters.
Checks whether the String
contains only digit characters.
Null
and empty String will return false
.
- Value parameters:
- str
the
String
to check
- Returns:
true
if str contains only Unicode numeric
Convert a String
to an int
, returning a default value if the
conversion fails.
Convert a String
to an int
, returning a default value if the
conversion fails.
If the string is null
, the default value is returned.
toInt(null, 1) = 1 toInt("", 1) = 1 toInt("1", 0) = 1
- Value parameters:
- defaultValue
the default value
- str
the string to convert, may be null
- Returns:
the int represented by the string, or the default if conversion fails
- Since:
3.0
transform to int.
transform to int.
- Value parameters:
- ids
an array of String objects.
- Returns:
an array of int objects.