From 229443778ffc6b26a13322983b81f4f1912427af Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 20 Dec 2018 13:02:24 -0500 Subject: Add serd_node_compare() --- include/serd/serd.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/serd') diff --git a/include/serd/serd.h b/include/serd/serd.h index 6aeb9138..4cf00f02 100644 --- a/include/serd/serd.h +++ b/include/serd/serd.h @@ -1032,6 +1032,18 @@ bool 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. +*/ +SERD_PURE_API +int +serd_node_compare(const SerdNode* SERD_NULLABLE a, + const SerdNode* SERD_NULLABLE b); + /** @} @defgroup serd_event Event Handlers -- cgit v1.2.1