The functions tag library is a standard El function set defined in jstl. The functions defined in the functions tag library are basically functions that operate on strings. To use the functions tag library on the JSP page, use the taglib command to specify the referenced tag library. For example:
<% @ Taglib prefix = "FN" uri = "http://java.sun.com/jsp/jstl/functions" %>
16 functions in the functions tag library.
FN: Contains label
Determines whether a string contains a specified substring. The syntax format is as follows:
FN: Contains (string, substring)-> Boolean
FN: containsignorecase tag
Determines whether a string contains a specified substring, regardless of the case. The syntax format is as follows:
FN: containsignorecase (string, substring)-> Boolean
FN: startswith tag
Determines whether a string starts with a specified prefix. The syntax format is as follows:
FN: startswith (string, prefix)-> Boolean
FN: endwith tag
Determines whether a string ends with a specified suffix. The syntax format is as follows:
FN: endwith (string, suffix)-> Boolean
FN: indexof tag
Searches for the specified substring in a string and returns the index position of the first character of the first matched string.
FN: indexof (string, substring)-> int
FN: Replace label
Replace a part of a string with another string, return the replacement, and return the replacement result. The syntax format is as follows:
FN: Replace (inputstring, beforesubstring, aftersubstring)-> string
FN: substring tag
Truncates a part of a string. The syntax format is as follows:
FN: substring (string, beginindex, endindex)-> string
FN: substringbefore tag
Returns the string before the substring in a string. The syntax format is as follows:
FN: substringbefore (string, substring)-> string
FN: substringafter tag
Returns the string after the specified substring. The syntax format is as follows:
FN: substringafter (string, substring)-> string
FN: spilt tag
Splits a string into a string array. The syntax format is as follows:
FN: spilt (string, delimiters)-> string
FN: Join label
Concatenates all elements in the array into a string. The syntax format is as follows:
FN: Join (array, separator)-> string
FN: tolowercase tag
Converts all characters in a string to lowercase. The syntax format is as follows:
FN: tolowercase (string)-> string
FN: touppercase tag
Converts all characters in a string to uppercase.
FN: touppercase (string)-> string
FN: trim tag
Removes the spaces before and after the string.
FN: trim (string)-> string
FN: escapexml label
Convert the character "<", ">", "&" in the string to the corresponding character reference or pre-defined object reference. The syntax format is as follows:
FN: escapexml (string)-> string
FN: length label
Returns the number of elements in a set or the number of characters in a string.
FN: length (input)-> int
Reprinted please indicate the source: http://blog.csdn.net/iAm333