StringConvertions extension
Methods
-
toDouble()
→ double
-
convert a string in and double value if is possible
throws a FormatException is string content is not a number value
-
toInt()
→ int
-
convert a string in and int value if is possible
throws a FormatException is string content is not a number value
-
tryToDouble()
→ double?
-
convert a String in and nullable double value
if the input value could be converted to int then it will return the converted value
when input value could not be converted to int then it will return null
-
tryToInt()
→ int?
-
convert a String in and nullable int value
if the input value could be converted to int then it will return the converted value
when input value could not be converted to int then it will return null