The blog post only shows the first 100 characters of the Java implementation intercept string! Use! <c:if test= "${fn:length (onebeans.info) >100}" >${Fn:substri
http://blog.csdn.net/tfy1332/article/details/22811835
2014-04-02 17:14 3406 People read comments (0) favorite reports
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
<%@ taglib prefix= "FN" uri= "http://java.sun.com/jsp/jstl/functions"% >
${WJCD.LRSJ} was originally obtained as 2006-11-12 11:22:22.0
${fn:substring (WJCD.LRSJ, 0, 16)}
Use the functions function to get the length of the list
${fn:length (List)}
- 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) of extraordinary significance 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)
- If the argument string starts with the argument prefix, returns true
- 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
Intercept the string! Use!
<c:if test= "${fn:length (onebeans.info) >100}" >${fn:substring (Onebeans.info, 0,100)} ...</c:if>
<c:if test= "${fn:length (onebeans.info) <=100}" >${Onebeans.info}</c:if>
Only the first 100 characters are displayed in the Java implementation intercept string! Use! <c:if test= "${fn:length (onebeans.info) >100}" >${Fn:substri