-
public final class StringExtensionsKt
-
-
Method Summary
Modifier and Type Method Description final static DoubleformatStringIntoDouble(String $self)Helper method that takes in a string as an argument - stringToFormat, and returns a double value that has been parsed from the string. -
-
Method Detail
-
formatStringIntoDouble
final static Double formatStringIntoDouble(String $self)
Helper method that takes in a string as an argument - stringToFormat, and returns a double value that has been parsed from the string. The method first attempts to parse the string as a double using the Double.parseDouble method. If this throws a NumberFormatException, the method then uses a NumberFormat instance with the default locale, to parse the string into a Number object. If the parsing of the Number object throws a ParseException, a RuntimeException is thrown
-
-
-
-