diff options
author | Karl Williamson <khw@cpan.org> | 2016-09-10 08:54:36 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2016-09-17 17:22:26 -0600 |
commit | 062b685031576af47e0f0097d66e7274cccc443f (patch) | |
tree | e369e02b1a132a192cdf6b02f340b16afc33feff /handy.h | |
parent | a791584fcdb7d580494680fbbcca3e3f880b78bf (diff) | |
download | perl-062b685031576af47e0f0097d66e7274cccc443f.tar.gz |
handy.h: Add memLT, memLE, memGT, memGE
These correspond to strLT, etc. I am deferring documenting them in case
this turns out to be a bad idea for some reason.
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -493,6 +493,11 @@ Returns zero if non-equal, or non-zero if equal. (sizeof(s2)-1 == l && memEQ(s1, ("" s2 ""), (sizeof(s2)-1))) #define memNEs(s1, l, s2) !memEQs(s1, l, s2) +#define memLT(s1,s2,l) (memcmp(s1,s2,l) < 0) +#define memLE(s1,s2,l) (memcmp(s1,s2,l) <= 0) +#define memGT(s1,s2,l) (memcmp(s1,s2,l) > 0) +#define memGE(s1,s2,l) (memcmp(s1,s2,l) >= 0) + /* * Character classes. * |