From b2d9843906fdaabca1237f6415533b0da1904765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sundstr=C3=B6m?= Date: Tue, 12 Apr 2011 18:10:02 +0000 Subject: [PATCH] Add BString::IsEmpty() method. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41242 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/os/support/String.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/headers/os/support/String.h b/headers/os/support/String.h index 05bfaad05a..f376afb1a7 100644 --- a/headers/os/support/String.h +++ b/headers/os/support/String.h @@ -28,6 +28,7 @@ public: int32 CountChars() const; int32 CountBytes(int32 fromCharOffset, int32 charCount) const; + bool IsEmpty() const; // Assignment BString& operator=(const BString& string); @@ -397,6 +398,13 @@ BString::Length() const } +inline bool +BString::IsEmpty() const +{ + return !Length(); +} + + inline const char* BString::String() const {