default @NonNull String readUntil(final char separator) {
        if (!this.hasRemainingInput()) {
            return "";
        }

        final String remainingInput = this.remainingInput();
        final int indexOfWhitespace = remainingInput.indexOf(separator);
        if (indexOfWhitespace == -1) {
            this.moveCursor(this.remainingLength());
            return remainingInput;
        } else {
            // We want to read until the whitespace. Thus, we do add
            // to account for the 0-indexing.
            return this.read(indexOfWhitespace);
        }
    }
Reads until the {@code separator}, and then preserves it.

@param separator the separator to read until
@return the read string
cloud-core/src/main/java/org/incendo/cloud/context/CommandInput.java