int length(String str)其中,str 为指定的字符串。
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> <!DOCTYPE html> <html> <head> <title>编程帮(www.lmcjl.com)</title> </head> <body> <c:set var="str" value="This is first String." /> str的长度:${fn:length(str)} </body> </html>
str的长度:21
本文链接:http://task.lmcjl.com/news/17042.html