This function converts a string into lowercase string. Any upper case character in the input string is replaced with the corresponding lowercase character.
Syntax
String fn:toLowerCase(String input)
Return type: String; Argument: Single argument of String type.It returns a String after converting the input string to lowercase.
Example 0f fn:toLowerCase()
In this example we are applying this function on two strings – one is a string variable and another is a hard-coded string which is given as an argument to the function. As you can see in the output that it has replaced the variable’s value and hard-coded string value to lowercase. Screenshot of the output is provided just after this code.
<%@ 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>fn:toLowerCase() example</title>
</head>
<body>
<c:set var="message" value="This is An Example of JSTL Function"/>
${fn:toLowerCase(message)}
${fn:toLowerCase("HELLO")}
</body>
</html>
Output:

Leave a Reply