Android String to Long Convert toLong(String str, long defValue)

Here you can find the source of toLong(String str, long defValue)

Description

to Long

Declaration

public static long toLong(String str, long defValue) 

Method Source Code

//package com.java2s;

public class Main {

    public static long toLong(String str, long defValue) {
        try {//  w  ww .ja  va2 s  .co m
            return Long.parseLong(str);
        } catch (Exception e) {
        }
        return defValue;
    }
}

Related

  1. toLong(String obj)
  2. isLong(String str)
  3. getLongValue(String str)
  4. stringToListLong(String input)
  5. toLong(String value)
  6. parseLong(String string, long defValue)
  7. convertStringToLong(String str, long failValue)
  8. stringToLong(String input)
  9. longsToString(long... longs)