aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-12-20 13:02:24 -0500
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:07 -0500
commitd1ba721d37af61f2b529faaa16bd20ba1e161b06 (patch)
tree2930f07857d5416eb193fe8afbcc4adecdc2e7ea /include/serd
parent08a3b8a18093d1623309f5f406865f51e7bff39a (diff)
downloadserd-d1ba721d37af61f2b529faaa16bd20ba1e161b06.tar.gz
serd-d1ba721d37af61f2b529faaa16bd20ba1e161b06.tar.bz2
serd-d1ba721d37af61f2b529faaa16bd20ba1e161b06.zip
Add serd_node_compare()
Diffstat (limited to 'include/serd')
-rw-r--r--include/serd/node.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/serd/node.h b/include/serd/node.h
index 50108f57..95638c68 100644
--- a/include/serd/node.h
+++ b/include/serd/node.h
@@ -410,6 +410,19 @@ 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.
+
+ Nodes are ordered first by type, then by string, then by language or
+ datatype, if present.
+*/
+SERD_PURE_API int
+serd_node_compare(const SerdNode* SERD_NONNULL a,
+ const SerdNode* SERD_NONNULL b);
+
+/**
@}
@}
*/