Custom JSP taglib used to format strings according to the given pattern.
For example:
<%@ taglib uri="taglib.tld" prefix="f" %> <f:formatString pattern="(###) ###-####">0959392359</f:formatString> and you will get the following: (095) 939-2359 Tag uses the following pattern syntax: The '#' character will be replaced by the next character in the string getting formatted. Other characters will be treated as literals. The '*' character will display all characters in the string at that point in the pattern. For example string "0959392359" with pattern "### *" will be formatted as: (095) 9392359 If you need to output '#' or '*' you may escape them with '$' character. To show a '$' in the result, the '$' character must be escaped too. For example string "abcd" with pattern "$$# $# ##" would result in: $a # cd Tags are: formatString Body tag formats own body according to the given pattern (format). Parameters are: 1) pattern describes a pattern
for downloading: Library: formattag.jar Description: taglib.tld See also Coldtags suite - the largest collection of custom JSP tags.
|
Also in Coldtags:
|