Ruby 4.1.0dev (2026-09-27 revision 25f659ba9f8b541331b56d6959167a4805892a14)
strncasecmp.h
1#ifndef PRISM_INTERNAL_STRNCASECMP_H
2#define PRISM_INTERNAL_STRNCASECMP_H
3
4#include <stddef.h>
5#include <stdint.h>
6
7/*
8 * Compare two strings, ignoring case, up to the given length. Returns 0 if the
9 * strings are equal, a negative number if string1 is less than string2, or a
10 * positive number if string1 is greater than string2.
11 *
12 * Note that this is effectively our own implementation of strncasecmp, but it's
13 * not available on all of the platforms we want to support so we're rolling it
14 * here.
15 */
16int pm_strncasecmp(const uint8_t *string1, const uint8_t *string2, size_t length);
17
18#endif