Java atoi atoi(String s)

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

Description

atoi

License

Open Source License

Declaration

public static int atoi(String s) 

Method Source Code

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

public class Main {
    public static int atoi(String s) {
        int value = 0;
        try {/*from   w  w  w  .j  a  v  a 2  s . co  m*/
            value = Integer.parseInt(s);
        } catch (NumberFormatException ex) {
            value = 0;
        }
        return value;
    }
}

Related

  1. atoi(byte[] s, int offset)
  2. atoi(final String s, final int base)
  3. atoi(final String s, final int def)
  4. atoi(final String str, final int def)
  5. atoi(Object s)
  6. atoi(String s)
  7. atoi(String s)
  8. atoi(String s)
  9. atoi(String s, int pos, int base)