#define NONULL(x) (x?x:"")
+static inline int m_strisempty(const char *s) {
+ return !s || !*s;
+}
+
static inline ssize_t m_strlen(const char *s) {
return s ? strlen(s) : 0;
}
return strcmp(NONULL(a), NONULL(b));
}
+static inline int m_strcasecmp(const char *a, const char *b) {
+ return strcasecmp(NONULL(a), NONULL(b));
+}
+
+static inline int m_strncmp(const char *a, const char *b, size_t n) {
+ return strncmp (NONULL(a), NONULL(b), n);
+}
+
+static inline int m_strncasecmp(const char *a, const char *b, size_t n) {
+ return strncasecmp(NONULL(a), NONULL(b), n);
+}
+
ssize_t m_strcpy(char *dst, ssize_t n, const char *src);
ssize_t m_strncpy(char *dst, ssize_t n, const char *src, ssize_t l);