目录

fn:toLowerCase()

fn:toLowerCase()函数将字符串的所有字符转换为小写。

语法 (Syntax)

fn:toLowerCase()函数具有以下语法 -

java.lang.String toLowerCase(java.lang.String)

例子 (Example)

下面的例子解释了fn:toLowerCase()函数的功能 -

<%@ 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>Using JSTL Functions</title>
   </head>
   <body>
      <c:set var = "string1" value = "This is first String."/>
      <c:set var = "string2" value = "${fn:toLowerCase(string1)}" />
      <p>Final string : ${string2}</p>
   </body>
</html>

您将收到以下结果 -

Final string : this is first string.
↑回到顶部↑
WIKI教程 @2018