default @This @NonNull CommandInput skipWhitespace(final int maxSpaces, final boolean preserveSingleSpace) {
        // We only skip the whitespace if the input doesn't end with a space. If it does, we do not want to consume it.
        if (preserveSingleSpace && this.remainingLength() == 1 && this.peek() == ' ') {
            return this;
        }
        for (int i = 0; i < maxSpaces && this.hasRemainingInput() && Character.isWhitespace(this.peek()); i++) {
            this.read();
        }
        return this;
    }
Skips {@code maxSpaces} of whitespace characters at the head of the input.

@param maxSpaces           maximum number of spaces of consume
@param preserveSingleSpace whether a single whitespace at the tail of the input should be ignored
@return {@code this}
cloud-core/src/main/java/org/incendo/cloud/context/CommandInput.java