Java String to Long atol(String s)

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

Description

atol

License

Open Source License

Declaration

public static long atol(String s) 

Method Source Code

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

public class Main {
    public static long atol(String s) {
        if (s == null)
            return 0;
        long result = 0;
        try {//from w w  w  .j a  v  a2 s  .c o m
            result = Long.parseLong(s);
        } catch (NumberFormatException e) {
        }

        return result;
    }
}

Related

  1. asLong(String v)
  2. asLong(String value)
  3. asLong(String value)
  4. atol(final String str, final long def)
  5. atol(String pString_)
  6. atol(String str)
  7. convertStringToLong(String string)