code: public static boolean getFlag(String flag, String[] options) 
      throws Exception {
      
      int pos = getOptionPos(flag, options);
  
      if (pos > -1)
        options[pos] = "";
      
      return (pos > -1);
    }
docs: Checks if the given array contains the flag "-String". Stops
  searching at the first marker "--". If the flag is found,
  it is replaced with the empty string.
  
  @param flag the String indicating the flag.
  @param options the array of strings containing all the options.
  @return true if the flag was found
  @exception Exception if an illegal option was found