Android String to Long Convert stringToLong(String input)

Here you can find the source of stringToLong(String input)


string To Long


public static Long stringToLong(String input) 

Method Source Code

//package com.java2s;

public class Main {
    public static Long stringToLong(String input) {
        try {//  w  w  w  .  j  a va 2
            return Long.parseLong(input);
        } catch (NumberFormatException e) {
            // e.printStackTrace();
            return 0l;


  1. stringToListLong(String input)
  2. toLong(String value)
  3. toLong(String str, long defValue)
  4. parseLong(String string, long defValue)
  5. convertStringToLong(String str, long failValue)
  6. longsToString(long... longs)
  7. parseCSLongs(String s)
  8. parseLong(String s)
  9. parseLongWithDefault(String s, long defValue)