public static String[] split(String s){
    	
    	if(s == null) return new String[0];
    	s = s.trim();
    	if(s.length() == 0) return new String[0];
    	
    	Vector v = new Vector();
    	
    	while(true){
    		int cut = s.indexOf(' ');
    		if(cut == -1) break;
    		v.addElement(s.substring(0, cut));
    		s = s.substring(cut+1).trim();
    	}
    	
    	String[] res = new String[v.size()+1];
    	for(int i = 0; i < res.length-1; i++){
    		res[i] = (String) v.elementAt(i);
    	}
    	res[res.length-1] = s;
    	return res;
    }