+// checks whether the passed in pointer is NULL and if the string is empty
+inline bool wxIsEmpty(const wxChar *p) { return !p || !*p; }
+
+// safe version of strlen() (returns 0 if passed NULL pointer)
+inline size_t wxStrlen(const wxChar *psz) { return psz ? wxStrlen_(psz) : 0; }
+
+// each of strdup() and wcsdup() may or may not be available but we need both
+// of them anyhow for wx/buffer.h so we define the missing one(s) in
+// wxchar.cpp and so we should always have both wxStrdupA and wxStrdupW
+// defined -- if this is somehow not the case in some situations, please
+// correct that and not the lines here
+#if wxUSE_UNICODE
+ #define wxStrdup wxStrdupW
+#else
+ #define wxStrdup wxStrdupA
+#endif
+