Due to padding in the Clay_String structure which is part of Clay_ElementId using memcmp to compare Clay_ElementIds is not possible.
I propose adding the following helper function to Clay:
bool Clay_ElementIdEqual(Clay_ElementId id1, Clay_ElementId id2) {
return (id1.id == id2.id)
&& (id1.baseId == id2.baseId)
&& (id1.offset == id2.offset)
&& (id1.stringId.length == id2.stringId.length)
&& (memcmp(id1.stringId.chars, id2.stringId.chars, id1.stringId.length) == 0);
}