summaryrefslogtreecommitdiff
path: root/dynstr.h
diff options
context:
space:
mode:
Diffstat (limited to 'dynstr.h')
-rw-r--r--dynstr.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/dynstr.h b/dynstr.h
index b532074..d0ac247 100644
--- a/dynstr.h
+++ b/dynstr.h
@@ -131,6 +131,11 @@ size_t dynstr_last_byte(Dynstr *dynstr, size_t offset, int byte);
size_t dynstr_first_string(Dynstr *dynstr, size_t offset, Dynstr *pattern);
size_t dynstr_last_string(Dynstr *dynstr, size_t offset, Dynstr *pattern);
+/* Compare two strings, return 0 if they are equal, negative if the
+ * first comes before the second, and positive if second comes first.
+ * Comparisons are done byte-by-byte using unsigned values. */
+int dynstr_cmp(Dynstr *dynstr1, Dynstr *dynstr2);
+
/* Write a dynamic string into an open file, either FILE or a Unix file
* handle. Return value is number of bytes written, just like for fwrite(3).
* If an error occurs, the size is less than the length of the string,