Java String to Double atof(String s)

Here you can find the source of atof(String s)

Description

atof

License

Open Source License

Declaration

public static double atof(String s) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static double atof(String s) {
        double d = Double.valueOf(s).doubleValue();
        if (Double.isNaN(d) || Double.isInfinite(d)) {
            System.err.print("NaN or Infinity in input\n");
            System.exit(1);/* www  .  j a  v a  2s. co  m*/
        }
        return (d);
    }
}

Related

  1. asDouble(final String str, final double def)
  2. asDouble(String str)
  3. asDouble(String string)
  4. asDouble(String value)
  5. atof(String pString_)
  6. atof(String s)
  7. atof(String s)
  8. convertStringToDouble(String num)
  9. convertStringToDouble(String number)