@Override
    public @NonNull ArgumentParseResult<String @NonNull []> parse(
            final @NonNull CommandContext<@NonNull C> commandContext,
            final @NonNull CommandInput commandInput
    ) {
        final int size = commandInput.remainingTokens();

        if (this.flagYielding) {
            final List<String> result = new LinkedList<>();

            for (int i = 0; i < size; i++) {
                final String string = commandInput.peekString();
                if (string.isEmpty() || FLAG_PATTERN.matcher(string).matches()) {
                    break;
                }
                result.add(commandInput.readString());
            }

            return ArgumentParseResult.success(result.toArray(new String[0]));
        } else {
            final String[] result = new String[size];
            for (int i = 0; i < result.length; i++) {
                result[i] = commandInput.readString();
            }
            return ArgumentParseResult.success(result);
        }
    }
Construct a new string array parser.

@param flagYielding Whether the parser should stop parsing when encountering a potential flag
cloud-core/src/main/java/org/incendo/cloud/parser/standard/StringArrayParser.java