diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2011-02-03 22:40:17 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2011-02-04 12:29:38 +0000 |
commit | 097ea7234aae7c4d444e63ab831dd09a932d36f6 (patch) | |
tree | 25f2f857e6eb92effbc0e6b4db10c61019dca443 /sal/inc | |
parent | 83734eea36acced7afb5caf8b58716f0d67a962f (diff) |
OString: New method isEmpty()
Diffstat (limited to 'sal/inc')
-rw-r--r-- | sal/inc/rtl/string.hxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx index 29583e9fde5b..daf95802a489 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 |