[haiku-commits] r41242 - haiku/trunk/headers/os/support

  • From: jonas@xxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 12 Apr 2011 20:10:02 +0200 (CEST)

Author: kirilla
Date: 2011-04-12 20:10:02 +0200 (Tue, 12 Apr 2011)
New Revision: 41242
Changeset: https://dev.haiku-os.org/changeset/41242

Modified:
   haiku/trunk/headers/os/support/String.h
Log:
Add BString::IsEmpty() method.

Modified: haiku/trunk/headers/os/support/String.h
===================================================================
--- haiku/trunk/headers/os/support/String.h     2011-04-11 23:55:01 UTC (rev 
41241)
+++ haiku/trunk/headers/os/support/String.h     2011-04-12 18:10:02 UTC (rev 
41242)
@@ -28,6 +28,7 @@
                        int32                   CountChars() const;
                        int32                   CountBytes(int32 fromCharOffset,
                                                                int32 
charCount) const;
+                       bool                    IsEmpty() const;
 
                        // Assignment
                        BString&                operator=(const BString& 
string);
@@ -397,6 +398,13 @@
 }
 
 
+inline bool
+BString::IsEmpty() const
+{
+       return !Length();
+}
+
+
 inline const char*
 BString::String() const
 {


Other related posts:

  • » [haiku-commits] r41242 - haiku/trunk/headers/os/support - jonas