Android String to Long Convert getLongValue(String str)

Here you can find the source of getLongValue(String str)

Description

get Long Value

Declaration

public static long getLongValue(String str) 

Method Source Code

//package com.java2s;

public class Main {
    public static long getLongValue(String str) {
        if (str != null && str.length() > 0) {
            try {
                return Long.parseLong(str);
            } catch (Exception e) {
            }/*from  w  ww . jav  a  2  s  . c  o m*/
        }
        return 0;
    }
}

Related

  1. parseLong(String s)
  2. getLongValue(String value, Long defaultValue)
  3. toLong(String obj)
  4. isLong(String str)
  5. stringToListLong(String input)
  6. toLong(String value)
  7. toLong(String str, long defValue)
  8. parseLong(String string, long defValue)