diff --git a/include/wx/string.h b/include/wx/string.h index f3c3c00111..c23b431316 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -266,6 +266,8 @@ public: size_t Len() const { return GetStringData()->nDataLength; } // string contains any characters? bool IsEmpty() const { return Len() == 0; } + // empty string is "FALSE", so !str will return TRUE + bool operator!() const { return IsEmpty(); } // empty string contents void Empty() {