Package 

Class StringExtensionsKt

    • Method Summary

      Modifier and Type Method Description
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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