[Libreoffice-commits] .: sal/inc

Michael Meeks mmeeks at kemper.freedesktop.org
Fri Feb 4 04:30:24 PST 2011


 sal/inc/rtl/string.hxx |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

New commits:
commit eb05de5301e33d53fb02840aa7ec75f0d101a330
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Thu Feb 3 22:40:17 2011 +0100

    OString: New method isEmpty()

diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx
index 5b1e2c2..186b515 100644
--- a/sal/inc/rtl/string.hxx
+++ b/sal/inc/rtl/string.hxx
@@ -223,6 +223,22 @@ public:
     sal_Int32 getLength() const SAL_THROW(()) { return pData->length; }
 
     /**
+      Checks if a string is empty.
+
+      @return   sal_True if the string is empty;
+                sal_False, otherwise.
+
+      @since LibreOffice 3.4
+    */
+    sal_Bool isEmpty() const SAL_THROW(())
+    {
+        if ( pData->length )
+            return sal_False;
+        else
+            return sal_True;
+    }
+
+    /**
       Returns a pointer to the characters of this string.
 
       <p>The returned pointer is not guaranteed to point to a null-terminated


More information about the Libreoffice-commits mailing list