Jsp-jstl-function-tolowercase

提供:Dev Guides
移動先:案内検索

JSTL-fn:toLowerCase()関数

  • fn:toLowerCase()*関数は、文字列のすべての文字を小文字に変換します。

構文

  • fn:toLowerCase()*関数には次の構文があります−
java.lang.String toLowerCase(java.lang.String)

次の例では、* 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.