static int atoi(String string){
		if(string==null || string.length()==0){
			return 0;
		}
		boolean flag;//pos-neg
		if(string.charAt(0)=='-'){
			flag=false;
		}
		else{
			flag=true;
		}
		
		double result = 0;
		int i=1;
		while(i<string.length() && string.charAt(i)>='0' && string.charAt(i)<='9'){
			result = 10*result + (string.charAt(i)-'0');
			i++;
		}
		if(flag==false){
			result = -result;
		}
		if(result>=Integer.MAX_VALUE){
			result = Integer.MAX_VALUE;
		}
		if(result<=Integer.MIN_VALUE){
			result = Integer.MIN_VALUE;
		}
		
		return (int)result;
	}