You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jorg Heymans <jh...@domek.be> on 2004/11/05 08:25:55 UTC
jx syntax madness
Hi,
Can anyone explain me why
${mystring.substring(mystring.indexOf('abc'))} works,
${mystring.substring(mystring.indexOf('abc') - 3)} works
but
${mystring.substring(mystring.indexOf('abc') + 3 )} *not* ?
Thanks!
Jorg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: jx syntax madness
Posted by oceatoon <t....@systheo.com>.
Hi Jorg
Have you tried to ParseInt?
I had a similar problem and bizarely solved by multipying by 1 which seemd
to cast my content into a integer.
Tibor
Jorg Heymans wrote:
> note that the -3 or +3 are entirely random here, bottomline is that i
> can subtract from the indexOf result, but not add to it...
>
>
> Jorg Heymans wrote:
>> Hi,
>>
>> Can anyone explain me why
>> ${mystring.substring(mystring.indexOf('abc'))} works,
>> ${mystring.substring(mystring.indexOf('abc') - 3)} works
>>
>> but
>> ${mystring.substring(mystring.indexOf('abc') + 3 )} *not* ?
>>
>>
>> Thanks!
>> Jorg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: jx syntax madness
Posted by Jorg Heymans <jh...@domek.be>.
note that the -3 or +3 are entirely random here, bottomline is that i
can subtract from the indexOf result, but not add to it...
Jorg Heymans wrote:
> Hi,
>
> Can anyone explain me why
> ${mystring.substring(mystring.indexOf('abc'))} works,
> ${mystring.substring(mystring.indexOf('abc') - 3)} works
>
> but
> ${mystring.substring(mystring.indexOf('abc') + 3 )} *not* ?
>
>
> Thanks!
> Jorg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org