fn:substringAfter() JSTL Function
Keywords : fn:substringAfter() Example, JSTL fn:substringAfter() Function, Use Of fn:substringAfter(String String) in JSTL,fn:substringAfter() JSTL Function Example explains about How To Use fn:substringAfter() JSTL Function inside JSP.
Consider an example string where you need to find a string followed by a specific substring.
fn:substringAfter() function provides to find a part of a particular string followed by a specific substring.
You can see the below example, which is demonstrating fn:substringAfter() JSTL Function
Tools Needed For This Example
fn:substringAfter() Example
<%@ 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 fn:substringAfter</title> </head> <body> <% // you can also set the values into request scope same as using c:set // request.setAttribute("str", "This is a TEST String"); %> <c:set var="str" value="This is a TEST String" /> ${fn:substringAfter(str, 'a')} </body> </html>
Output
TEST String|
|