diff options
Diffstat (limited to 'include/serd/serd.h')
-rw-r--r-- | include/serd/serd.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h index 4067fa3f..5d0f7290 100644 --- a/include/serd/serd.h +++ b/include/serd/serd.h @@ -878,6 +878,21 @@ serd_node_equals(const SerdNode* SERD_NULLABLE a, const SerdNode* SERD_NULLABLE b); /** + Compare two nodes. + + Returns less than, equal to, or greater than zero if `a` is less than, equal + to, or greater than `b`, respectively. NULL is treated as less than any + other node. + + Nodes are ordered first by type, then by string value, then by language or + datatype, if present. +*/ +SERD_PURE_API +int +serd_node_compare(const SerdNode* SERD_NONNULL a, + const SerdNode* SERD_NONNULL b); + +/** @} @defgroup serd_nodes Nodes @{ |