Java String to Long atol(final String str, final long def)

Here you can find the source of atol(final String str, final long def)

Description

atol

License

Open Source License

Declaration

public static long atol(final String str, final long def) 

Method Source Code

//package com.java2s;

public class Main {
    public static long atol(final String str, final long def) {
        try {/*from   w  w  w.  j  ava  2s  .c  o  m*/
            return Long.parseLong(str);
        } catch (final Exception ex) {
            ex.printStackTrace();
        }
        return def;
    }
}

Related

  1. asLong(String str, long defaultValue)
  2. asLong(String string)
  3. asLong(String v)
  4. asLong(String value)
  5. asLong(String value)
  6. atol(String pString_)
  7. atol(String s)
  8. atol(String str)
  9. convertStringToLong(String string)