ArgIteratorWindows
Iterator that implements the Windows command-line parsing algorithm.
The implementation is intended to be compatible with the post-2008 C runtime,
but is not intended to be compatible with CommandLineToArgvW since
CommandLineToArgvW uses the pre-2008 parsing rules.
This iterator faithfully implements the parsing behavior observed from the C runtime with one exception: if the command-line string is empty, the iterator will immediately complete without returning any arguments (whereas the C runtime will return a single argument representing the name of the current executable).
The essential parts of the algorithm are described in Microsoft's documentation:
David Deley explains some additional undocumented quirks in great detail:
Fields of this type
Fields
`cmd_line_w` *must* be a WTF16-LE-encoded string.
Functions
Error sets in this namespace