English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Função fn:toLowerCase() do JSTL

Biblioteca de Tags Padrão do JSP

A função fn:toLowerCase() transforma todos os caracteres da string em minúsculo.

Sintaxe

Sintaxe da função fn:toLowerCase()

${fn.toLowerCase(<string>)}

Exemplo de Demonstração

A seguir, um exemplo demonstra a função dessa função:

<%@ 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>Usar funções </title>
</head>
<body>
<c:set var="string1" value="I am from w3codebox/>
<c:set var="string2" value="${fn:toLowerCase(string1)" />
<p>String é: ${string2}<//p>
</body>
</html>

O resultado da execução é o seguinte:

A string é: : i am from w3codebox

Biblioteca de Tags Padrão do JSP