JSP 教程教程
JSTL fn:toLowerCase()函数
JSTL fn:toLowerCase()函数
fn:toLowerCase()函数
JSP 标准标签库fn:toLowerCase()函数将字符串中的所有字符转为小写。
语法
fn:toLowerCase()函数的语法如下:
${fn.toLowerCase(<string>)}
实例演示
以下实例演示了这个函数的功能:
<%@ 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" %> <html> <head> <title>使用 JSTL 函数</title> </head> <body> <c:set var="string1" value="I am from verydoc"/> <c:set var="string2" value="${fn:toLowerCase(string1)}" /> <p>字符串为 : ${string2}</p> </body> </html>
运行结果如下:
字符串为 : i am from verydoc
JSP 标准标签库
JSTL fn:toLowerCase()函数 |
---|
JSP 教程
JSP,即 Java Server Pages,是由 Sun Microsystems 公司倡导和许多公司参与共同创建的一种使软件开发者可以响应客户端请求,而动态生成 HTML、XML 或其他格式文档的 Web 网页的技术标准。