[Turn]jstl-functions label for detailed

Source: Internet
Author: User


Name of function Function description Examples of Use
Fn:contains Determine if a string contains another string <c:if test= "${fn:contains (name, SearchString)}" >
Fn:containsignorecase Determines whether a string contains another string (case-insensitive) <c:if test= "${fn:containsignorecase (name, SearchString)}" >
Fn:endswith Determines whether a string ends with a different string <c:if test= "${fn:endswith (filename,". txt ")}" >
Fn:escapexml Turn some characters into XML representations, such as < characters should be converted to &lt; ${fn:escapexml (Param:info)}
Fn:indexof The position where the substring appears in the parent string ${fn:indexof (Name, "-")}
Fn:join Unites the data in the array into a new string and uses the specified character format to open the ${fn:join (Array, ";")}
Fn:length Gets the length of the string, or the size of the array ${fn:length (Shoppingcart.products)}
Fn:replace Replace the character specified in the string ${fn:replace (Text, "-", "& #149;")}
Fn:split Segmentation the string according to the specified word ${fn:split (Customernames, ";")}
Fn:startswith Determines whether a string starts with a substring <c:if test= "${fn:startswith (product.id," 100-")}" >
Fn:substring Get child string ${fn:substring (Zip, 6,-1)}
Fn:substringafter

Gets the substring starting at the location of a character

${fn:substringafter (Zip, "-")}
Fn:substringbefore Gets the substring from the beginning to the location of a character ${fn:substringbefore (Zip, "-")}
Fn:tolowercase Convert to lowercase ${fn.tolowercase (Product.name)}
Fn:touppercase Convert to uppercase characters ${fn. Uppercase (Product.name)}
Fn:trim Remove spaces before and after a string ${fn.trim (name)}

Function

Describe

Fn:contains (string, substring)

Returns true if the parameter string contains the parameter substring

Fn:containsignorecase (string, substring)

Returns true if the parameter string contains the parameter substring (ignoring case)

Fn:endswith (string, suffix)

Returns true if the argument string ends with the argument suffix

Fn:escapexml (String)

Convert XML (and HTML) that has special meaning to the corresponding XML character entity code, and return

Fn:indexof (string, substring)

Returns the position of the first occurrence of the parameter substring in the parameter string

Fn:join (array, separator)

Separator a given array array together with the given spacer, forming a new string and returning it.

Fn:length (item)

Returns the number of elements contained in the parameter item. The parameter item type is an array, a collection, or a string. If it is of type string, the return value is the number of characters in string.

Fn:replace (String, before, after)

Returns a String object. Replaces all occurrences of a parameter before string in a parameter string with a parameter after string, and returns the replaced result

Fn:split (string, separator)

Returns an array that splits the argument string with the parameter separator, and each part of the split is an element of the array

Fn:startswith (string, prefix)

Returns true if the argument string starts with the argument prefix

Fn:substring (string, begin, end)

Returns the string part of the argument, starting with the argument begin to the end position of the argument, including the character of the end position

Fn:substringafter (string, substring)

Returns the part of the string that follows the parameter substring in the argument string

Fn:substringbefore (string, substring)

Returns the part of the string that precedes the argument substring in the argument string

Fn:tolowercase (String)

Converts all characters of the argument string to lowercase and returns it

Fn:touppercase (String)

Converts all characters of the argument string to uppercase and returns it

Fn:trim (String)

Strips the argument string from the end of the space and returns it

[Turn]jstl-functions label for detailed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.