Hi Thomas,
On Fri, 2011-01-21 at 13:52 +0100, Thomas Arnhold wrote:
New method: isEmpty() - Checks if a string is empty.
I like it.
There are lots of use-cases that we need to get into sal: that we sadly
don't have at the moment: to make writing code easier and less
error-prone.
With isEmpty() this looks like:
if (aStr.isEmpty()) {...}
if (!aStr.isEmpty()) {...}
Prettier for sure.
There are some methods that are all 'pure' and all that (like those for
tokenising rtl::OUStrings) that get used in fairly unreadable ways
around the place. In a world of iterators, it is unclear to me why we
need to be managing string offsets and odd loops using 'getToken()'
Really, we need to be making OUStrings and StringBuffers easier to use,
so that we can use them everywhere - in place of the obsolete (mutable)
tools/inc/tools/string.hxx (UniString) - (mostly called 'String' outside
there).
I suppose, simply porting a good number of String instances would help
us fall over the missing pieces there.
Anyhow - nice patch, pushed to master; I added a:
@since LibreOffice 3.4
tag to the method call, since this low level piece is intended to be a
stable ABI that is managed in that way.
Thanks !
Michael.
--
michael.meeks@novell.com <><, Pseudo Engineer, itinerant idiot
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.