diff options
Diffstat (limited to 'prism/internal/strncasecmp.h')
| -rw-r--r-- | prism/internal/strncasecmp.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/prism/internal/strncasecmp.h b/prism/internal/strncasecmp.h new file mode 100644 index 0000000000..775f6a993e --- /dev/null +++ b/prism/internal/strncasecmp.h @@ -0,0 +1,18 @@ +#ifndef PRISM_INTERNAL_STRNCASECMP_H +#define PRISM_INTERNAL_STRNCASECMP_H + +#include <stddef.h> +#include <stdint.h> + +/* + * Compare two strings, ignoring case, up to the given length. Returns 0 if the + * strings are equal, a negative number if string1 is less than string2, or a + * positive number if string1 is greater than string2. + * + * Note that this is effectively our own implementation of strncasecmp, but it's + * not available on all of the platforms we want to support so we're rolling it + * here. + */ +int pm_strncasecmp(const uint8_t *string1, const uint8_t *string2, size_t length); + +#endif |
