The fn:join() function
The fn:join() function joins all elements of an array into a string using a specified delimiter.
Syntax
The syntax of the fn:join() function is as follows:
${fn:join([数组], <分隔符>)}
Example Demonstration
The following example demonstrates the function:
<%@ 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" %>
使用 JSTL 函数
字符串为 : ${string3}
**Note:** The fn:split function splits a string by a specified delimiter into an array of substrings.
The running result is as follows:
字符串为 : www-runoob-com
JSP Standard Tag Library