Add a_strcasecmp() function

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-03-19 17:33:54 +01:00
parent 6337115e2e
commit 58402c9641
1 changed files with 11 additions and 0 deletions

View File

@ -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.