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.me...@novell.com <><, Pseudo Engineer, itinerant idiot _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice