private String parseNextNonce(final CharSequence buffer, final ParserCursor cursor) {
        while (!cursor.atEnd()) {
            final String name = tokenParser.parseToken(buffer, cursor, TOKEN_DELIMS);
            if ("nextnonce".equals(name)) {
                cursor.updatePos(cursor.getPos() + 1);
                return tokenParser.parseValue(buffer, cursor, VALUE_DELIMS);
            }
            if (!cursor.atEnd()) {
                cursor.updatePos(cursor.getPos() + 1);
            }
        }
        return null;
    }
Parses the {@code Authentication-Info} header content represented by a {@link CharArrayBuffer}
to extract the {@code nextnonce} parameter.

@param buffer the {@link CharArrayBuffer} containing the value of the {@code Authentication-Info} header
@param cursor the {@link ParserCursor} used to navigate through the buffer content
@return the extracted {@code nextnonce} parameter value, or {@code null} if the parameter is not found
httpclient5/src/main/java/org/apache/hc/client5/http/protocol/NextNonceInterceptor.java