[Libreoffice] [PATCH] ure/sal/inc/rtl/ustring.hxx - new method isEmpty()

Thomas Arnhold thomas at arnhold.org
Fri Jan 21 04:52:56 PST 2011


Hi folks,

what do you think about this idea:

New method: isEmpty() - Checks if a string is empty.

This could simplify logics in the source. Now this test is done
like 'if (aStr.getLength() != 0) {...}' or 'if (!aStr.getLength()) {...}'.

With isEmpty() this looks like:
if (aStr.isEmpty()) {...}
if (!aStr.isEmpty()) {...}

I think this would make the code more readable.

-Thomas
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-New-method-isEmpty-Checks-if-a-string-is-empty.patch
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110121/df1d9c30/attachment.ksh>


More information about the LibreOffice mailing list