cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans ...@domek.be>
Subject Re: jx syntax madness
Date Fri, 05 Nov 2004 08:22:02 GMT
Nope, i'm in the middle of a 20 char string, when i leave out the +3 (or 
+1 or +2 or whatever) it works as expected. I just want to get a fixed 
number of characters past a substring match to the end of the string.

I don't see any exceptions or stacktraces at all, the resulting string 
is just empty.


I'm on 2.1.5.1 FWIW

Jorg

Bart Molenkamp wrote:
> Well I think that there is nothing wrong with mystring.indexOf('abc') +
> 3, but maybe the substring method throws an IndexOutOfBoundsException?
> 
> 
>>-----Original Message-----
>>From: news [mailto:news@sea.gmane.org] On Behalf Of Jorg Heymans
>>Sent: Friday, November 05, 2004 9:04 AM
>>To: users@cocoon.apache.org
>>Subject: Re: jx syntax madness
>>
>>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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message