default @NonNull String peekString() {
        if (!this.hasRemainingInput()) {
            return "";
        }

        final String remainingInput = this.remainingInput();
        final int indexOfWhitespace = remainingInput.indexOf(' ');
        if (indexOfWhitespace == -1) {
            return remainingInput;
        }

        final StringBuilder builder = new StringBuilder();
        for (int i = 0; i < remainingInput.length(); i++) {
            final char currentChar = remainingInput.charAt(i);
            if (Character.isWhitespace(currentChar)) {
                // Skip leading whitespace.
                if (builder.length() == 0) {
                    continue;
                }

                // End on trailing whitespace.
                break;
            }
            builder.append(currentChar);
        }

        return builder.toString();
    }
{@link #peek() Peeks} until the next whitespace is encountered, skipping leading whitespace.

@return the peeked string
cloud-core/src/main/java/org/incendo/cloud/context/CommandInput.java