From 9b580f1a46571424e85b5fd9f41cb32df92ca7e0 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 20 Dec 2018 13:02:24 -0500 Subject: Add serd_node_compare() --- serd/serd.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'serd') diff --git a/serd/serd.h b/serd/serd.h index e9484ec9..aaf66549 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -642,6 +642,17 @@ SERD_API bool serd_node_equals(const SerdNode* a, const SerdNode* 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_API +int +serd_node_compare(const SerdNode* a, const SerdNode* b); + /** Create a new URI from a string. */ -- cgit v1.2.1