RStringConvert extension
convert string to different types
- on
Methods
-
toChars(
) → List< String> - Convert String to List of Characters
-
toDate(
) → DateTime -
convert String to
DateTime
if is possible else throwFormatException
-
toDateOr(
DateTime value) → DateTime - convert String to DateTime if is possible else will return value
-
toDateOrNow(
) → DateTime - convert String to DateTime if is possible else will return DateTime Now
-
toDateOrNull(
) → DateTime? - convert String to DateTime if is possible else will return null
-
toDouble(
) → double -
convert String to
double
if is possible else throwFormatException
-
toDoubleOr(
double value) → double - convert String to double if is possible else will return value
-
toDoubleOrNull(
) → double? - convert String to double if is possible else will return null
-
toInt(
) → int -
convert String to int if is possible
else throw
FormatException
-
toIntOr(
int value) → int - convert String to int if is possible else will return value
-
toIntOrNull(
) → int? - convert String to int if is possible else will return null
-
toNum(
) → num -
convert String to
num
if is possible else throwFormatException
-
toNumOr(
num value) → num - convert String to DateTime if is possible else will return value
-
toNumOrNull(
) → num? - convert String to DateTime if is possible else will return null
-
toNumOrZero(
) → num -
convert String to
num
if is possible else return0