rcutils
master
C API providing common utilities and data structures.
|
Go to the source code of this file.
Functions | |
int | rcutils_strcasecmp (const char *s1, const char *s2, int *value) |
Case insensitive string compare. More... | |
int | rcutils_strncasecmp (const char *s1, const char *s2, size_t n, int *value) |
Case insensitive string compare up to count characters. More... | |
int rcutils_strcasecmp | ( | const char * | s1, |
const char * | s2, | ||
int * | value | ||
) |
Case insensitive string compare.
This function compares two strings ignoring case in a portable way. This performs a byte-by-byte comparison of the strings s1 and s2, ignoring the case of the characters.
[in] | s1 | Null terminated string to compare. |
[in] | s2 | Null terminated string to compare. |
[out] | value | Pointer to comparison result. An integer less than, equal to, or greater than zero if s1 is, after ignoring case, found to be less than, to match, or be greater than s2, respectively. |
int rcutils_strncasecmp | ( | const char * | s1, |
const char * | s2, | ||
size_t | n, | ||
int * | value | ||
) |
Case insensitive string compare up to count characters.
This function compares two strings ignoring case in a portable way. This performs a byte-by-byte comparison of the strings s1 and s2 up to count characters of s1 and s2, ignoring the case of the characters.
[in] | s1 | First string to compare. |
[in] | s2 | Second string to compare. |
[in] | n | Count of characters to compare. |
[out] | value | Pointer to comparison result. An integer less than, equal to, or greater than zero if s1 is, after ignoring case, found to be less than, to match, or be greater than s2, respectively. |