Add a_strcasecmp() function
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
6337115e2e
commit
58402c9641
|
@ -177,6 +177,17 @@ static inline int a_strcmp(const char *a, const char *b)
|
|||
return strcmp(NONULL(a), NONULL(b));
|
||||
}
|
||||
|
||||
/** \brief \c NULL resistant strcasecmp.
|
||||
* \param[in] a the first string.
|
||||
* \param[in] b the second string.
|
||||
* \return <tt>strcasecmp(a, b)</tt>, and treats \c NULL strings like \c ""
|
||||
* ones.
|
||||
*/
|
||||
static inline int a_strcasecmp(const char *a, const char *b)
|
||||
{
|
||||
return strcasecmp(NONULL(a), NONULL(b));
|
||||
}
|
||||
|
||||
/** \brief \c NULL resistant strncmp.
|
||||
* \param[in] a the first string.
|
||||
* \param[in] b the second string.
|
||||
|
|
Loading…
Reference in New Issue