Class SMNumberFormat

java.lang.Object
com.softwaremining.platformutils.SMNumberFormat

public class SMNumberFormat extends Object
  • Constructor Details

    • SMNumberFormat

      public SMNumberFormat()
  • Method Details

    • removeDecimal

      public static String removeDecimal(int integerSize, Number newValue)
      Deprecated.
      Parameters:
      newValue -
      Returns:
    • stringifyAndRemoveExponent

      public static String stringifyAndRemoveExponent(Number newValue)
      Converts the number to a string, ensuring that the exponents representation (E) is not used.
      For example, 1E12 will be converted to "1000000000000"
    • removeExponentFromString

      public static String removeExponentFromString(String result)
      Removes the exponent part of the number. E.g. from "1.2E10" to "12000000000"
      Parameters:
      result - - a stringified number - e.g. "123", "123.45" or "1,2345E20)
      Returns: