org.encog.mathutil

## Class Convert

- java.lang.Object
- - org.encog.mathutil.Convert

-     public final class Convert
      extends Object

  This class is used to convert strings into numeric values. If the string holds a non-numeric value, a zero is returned.
  Author:
    jheaton

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static double` | `string2double(String str)` Convert a string to a double.
    `static int` | `string2int(String str)` Convert a string to an int.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### string2double

          public static double string2double(String str)

      Convert a string to a double. Just make the number a zero if the string is invalid.
      Parameters:
        `str` - The string.
      Returns:
        The string converted to numeric.

    - #### string2int

          public static int string2int(String str)

      Convert a string to an int. Just make the number a zero if the string is invalid.
      Parameters:
        `str` - The string.
      Returns:
        The string converted to numeric.

Copyright © 2014. All Rights Reserved.