On 18 Jul 2002, David M. Karr wrote: > I checked the spec for this, and I didn't see any way to do it, but > I'll ask here just in case. > > Is there any way to do substring comparisons? I can do equality > checks on strings, but I'm trying to figure out how to check whether a > string is a substring of another string. > > This is part of my project of building a tag library derived from the > Struts tag library that uses the JSTL EL engine instead of using RT > values.
No, the JSTL 1.0 EL doesn't support any facility for substring matches. It's often best to use another custom tag library, or Java code in a servlet, for that. In JSP 2.0, the proposed support for "functions" will let you register a function to do substring matching and other common string operations. -- Shawn Bayern "JSTL in Action" http://www.jstlbook.com (coming in July 2002 from Manning Publications) -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>