Removes white space from both ends of a string according to the semantics of method trim() of the Java class java.lang.String.
Usage:
${fn:trim(myString)}I should hopefully be able to have an early access of the JSTL 1.1 spec posted soon.
-- Pierre
Chen, Gin wrote:
Thanks Pierre :) Is there usage examples of these? For example does trim work just like trim in java? <c:out value="${myString.trim()}"/> Thanks, -Tim
-----Original Message----- From: Pierre Delisle [mailto:[EMAIL PROTECTED] Sent: Friday, May 30, 2003 1:29 PM To: Tag Libraries Users List Subject: Re: JSTL Defined Methods
Chen, Gin wrote:
Sorry this was posted not too long ago but I can't find it in the
archives.
What are the JSTL 1.0 defined functions? (for trimming etc) -Tim
See below. Please note that these EL functions are only available in JSTL 1.1.
-------- Original Message -------- Subject: Re: Rif: Re: float to int conversion using EL; also how we can use ceil(), floor(), ... Date: Thu, 22 May 2003 11:06:04 -0700 From: Pierre Delisle <[EMAIL PROTECTED]> Reply-To: Tag Libraries Users List <[EMAIL PROTECTED]> To: Tag Libraries Users List <[EMAIL PROTECTED]> References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
Mark R. Diggory wrote:
On another side Note:
Wouldn't it be good as well to provide a standard set of "static" methods available in "java.lang" / "java.util" in general including things like String concatenation, substrings, comparision, math and dates? Sounds like the start of a "Standard EL functions" library?
JSTL 1.1 includes 16 standardized functions.
Length function: - To get the length of a collection or string (length)
String manipulation functions:
- Change the capitalization of a string (toLowerCase, toUpperCase)
- Get a subset of a string (substring, substringAfter, substringBefore)
- Trim a string (trim)
- Replace characters in a string (replace)
- Check if a string contains another string (indexOf, startsWith, endsWith,
contains, containsIgnoreCase)
- split a string (split) into an array, and join an array into a string
(join)
- Escape XML characters in the string (escapeXml)
The JSTL Expert Group did not go overboard with functions in JSTL 1.1
because it is not clear yet how the EL will evolve in the future. If the EL ever allows
method invocation, then many of the above functions would not be required.
-- Pierre
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
