[SOLVED] Re: About initial value of token counting

2015-04-13 Thread julien2412
Ok, I had misinterpreted it as the number of times "search pattern" is found in "search string". Thank you! :-) -- View this message in context: http://nabble.documentfoundation.org/About-initial-value-of-token-counting-tp4146131p4146134.html Sent from the Dev mai

Re: About initial value of token counting

2015-04-13 Thread Stephan Bergmann
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

About initial value of token counting

2015-04-13 Thread julien2412
/source/core/tool/stringutil.cxx#353 If the pattern isn't found, the return shouldn't be 0 instead of 1? (I suppose it works but don't understand the logic) Julien -- View this message in context: http://nabble.documentfoundation.org/About-initial-value-of-token-counting-tp4146131