private @NonNull ArgumentParseResult<String> parseGreedy(
            final @NonNull CommandInput commandInput
    ) {
        final int size = commandInput.remainingTokens();
        final StringJoiner stringJoiner = new StringJoiner(" ");

        for (int i = 0; i < size; i++) {
            final String string = commandInput.peekString();

            if (string.isEmpty()) {
                break;
            }

            if (this.stringMode == StringMode.GREEDY_FLAG_YIELDING) {
                // The pattern requires a leading space.
                if (FLAG_PATTERN.matcher(string).matches()) {
                    break;
                }
            }

            stringJoiner.add(commandInput.readStringSkipWhitespace(false /* preserveSingleSpace */));
        }

        return ArgumentParseResult.success(stringJoiner.toString());
    }
Construct a new string parser

@param stringMode         String parsing mode
cloud-core/src/main/java/org/incendo/cloud/parser/standard/StringParser.java