package iDSS.utils;


import java.util.*;
import javax.swing.*;
import java.io.*;





public class StringHandler {




    public static double stringToDouble(String s) {

        double d = 0;

        if(s != null) {

            try {

                d = Double.parseDouble(s);

            } //try

            catch (NumberFormatException nfe) {

            } //catch (NumberFormatException nfe)

        } //if(s != null)


        return d;

    } //public static double stringToDouble(String s)





    public static long stringToLong(String s) {

        long l = 0;

        if(s != null) {

            try {

                l = Long.parseLong(s);

            } //try

            catch (NumberFormatException nfe) {

            } //catch (NumberFormatException nfe)

        } //if(s != null)


        return l;

    } //public static long stringToLong(String s)





 } //public class StringHandler
