docs: public static int getOptionPos(String flag, String[] options) {
      if (options == null)
        return -1;
      
      for (int i = 0; i < options.length; i++) {
        if ((options[i].length() > 0) && (options[i].charAt(0) == '-')) {
  	// Check if it is a negative number
  	try {
  	  Double.valueOf(options[i]);
  	} 
  	catch (NumberFormatException e) {
  	  // found?
  	  if (options[i].equals("-" + flag))
  	    return i;
  	  // did we reach "--"?
  	  if (options[i].charAt(1) == '-')
  	    return -1;
  	}
        }
      }
      
      return -1;
    }