comparison in hiredis

Skip to first unread message

Peng Wang

Aug 29, 2021, 10:26:54 AMAug 29
Hi, how to compare a redisreply object to a string?

A multi bulk reply. The number of elements in the multi bulk reply is stored in
reply->elements. Every element in the multi bulk reply is a redisReply object as well
and can be accessed via reply->element[..index..].
Redis may reply with nested arrays but this is fully supported.
I want to compare the reply->element[..index..] to a string. Let's say: reply->element[i]->str != "(null)" But this is not working now.

How to do this?
Thank you
Reply all
Reply to author
0 new messages