Introduce tr_str_is_empty to relay intent better

This commit is contained in:
Mike Gelfand
2019-07-13 11:52:44 +03:00
parent bff188c2cf
commit a3e4919385
30 changed files with 73 additions and 66 deletions

View File

@@ -202,6 +202,11 @@ char* tr_strdup(void const* in);
*/
int tr_strcmp0(char const* str1, char const* str2);
static inline bool tr_str_is_empty(char const* value)
{
return value == NULL || *value == '\0';
}
/**
* @brief like memcmp() but gracefully handles NULL pointers
*/