Package: org.codehaus.groovy.tools.shell.util

## [Groovy] Class CommandArgumentParser

- org.codehaus.groovy.tools.shell.util.CommandArgumentParser

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `static List<String>` | `parseLine(String untrimmedLine, int numTokensToCollect = -1)` takes a String and tokenizes it according to posix-shell-like rules, meaning arguments are separated by blanks or hyphens, and hyphens wrap tokens regardless of blanks, other hyphens or escaped hyphens within the wrapping hyphens.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, toString, hashCode, getClass, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### static List<String> parseLine(String untrimmedLine, int numTokensToCollect = -1)

      takes a String and tokenizes it according to posix-shell-like rules, meaning arguments are separated by blanks or hyphens, and hyphens wrap tokens regardless of blanks, other hyphens or escaped hyphens within the wrapping hyphens. Example: "foo bar 123'456' 'abc\'def\\' ''" has 6 tokens: ["foo", "bar", "123", "456", "abc'def\", ""]

      Parameters:
        untrimmedLine
        `numTokensToCollect` - stop processing after so many tokens, negative means unlimited
      Returns: