diff options
author | David Robillard <d@drobilla.net> | 2018-12-20 13:02:24 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 18:49:07 -0500 |
commit | d1ba721d37af61f2b529faaa16bd20ba1e161b06 (patch) | |
tree | 2930f07857d5416eb193fe8afbcc4adecdc2e7ea /include/serd | |
parent | 08a3b8a18093d1623309f5f406865f51e7bff39a (diff) | |
download | serd-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.h | 13 |
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); + +/** @} @} */ |