Ruby 3.5.0dev (2025-04-25 revision 8e258af5b083a417a8f5e424a2c7d2c4800f8ca2)
|
A custom strncasecmp implementation. More...
Go to the source code of this file.
Functions | |
int | pm_strncasecmp (const uint8_t *string1, const uint8_t *string2, size_t length) |
Compare two strings, ignoring case, up to the given length. | |
A custom strncasecmp implementation.
Definition in file pm_strncasecmp.h.
int pm_strncasecmp | ( | const uint8_t * | string1, |
const uint8_t * | string2, | ||
size_t | length | ||
) |
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.
string1 | The first string to compare. |
string2 | The second string to compare |
length | The maximum number of characters to compare. |
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.
Definition at line 25 of file pm_strncasecmp.c.