From: "Martin van den Bemt" <[EMAIL PROTECTED]>
> Please reply to commons-user ;).. It's a user question ;)
>
> On Mon, 2002-07-29 at 12:30, Martin van den Bemt wrote:
> > Hi everyone,
> >
> > Is it possible to do eg a String.substring in jelly.
> > As an example :
> > String a = "Martin van den Bemt"
> > String b = "Martin"
> > String c = a.substring(b.length());
> >
> > Where a / b and c are jelly variables.
> > I looked at the define taglib, but I got stuck there..

You can invoke any method on any object using normal Java syntax thanks to
Jexl. So you could do

<j:set var="a">Martin van den Bemt</j:set>
<j:set var="b">Martin</j:set>
<j:set var="c" value="${a.substring(b.length())}"/>

If you wish.

It might be interesting to consider binding, say, the StringUtils in
commons-lang into a Jelly library.

http://jakarta.apache.org/commons/lang/api/org/apache/commons/lang/StringUti
ls.html

One thing we've not yet tried experimenting with is to turn static helper
methods into a Jelly library, or to add custom functions to Jexl.

James

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to