Is it possible to exclude a certain string from .length in a String[]?
<p>I'm working on a command-based modification for Minecraft in which you are allowed to use flags (-[a-z]) to specify certain values. However, I'm slightly confused on how I should go about parsing regular arguments. Here's an example of a command: <code>/tp fist -h</code>. Of course, it's relatively simple to what string[0] equals, but if I were to try <code>/tp -h fist</code>, I'm afraid I would confuse the modification and it would throw an exception.</p>

<p>So, my question is: is it possible to create a String[ ] which removes a specific type of string from an existing list so I can do <code>if(args[0].equalsIgnoreCase("text")</code> and it would do the same thing for <code>/command text [text-to-remove]</code> as if I did <code>/command [text-to-remove] text</code>?</p>

<p>Thanks in advance!</p>

<p>Sincerely,</p>

<p>afistofirony</p>

<p>PS: I know I can use a for loop to check each individual argument, but normally the variables will change for each execution (since they are usually used to specify players that don't all share a name).</p>
