About initial value of token counting
Stephan Bergmann
sbergman at redhat.com
Mon Apr 13 07:53:06 PDT 2015
On 04/13/2015 04:45 PM, julien2412 wrote:
> Sorry for this dumb question but why the token count is initialized at 1
> and not at 0 in these:
> 1) tmpl_getTokenCount
> http://opengrok.libreoffice.org/xref/core/comphelper/source/misc/string.cxx#117
> ()
>
> 2) ScStringUtil::GetQuotedTokenCount
> http://opengrok.libreoffice.org/xref/core/sc/source/core/tool/stringutil.cxx#353
>
> If the pattern isn't found, the return shouldn't be 0 instead of 1?
For example, splitting "foo" into tokens separated by "," should
probably report one token ("foo").
More information about the LibreOffice
mailing list