diff options
Diffstat (limited to 'dynstr.h')
-rw-r--r-- | dynstr.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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, |