%@ page contentType="text/html;charset=Big5" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
Input String | Substring | Result |
---|---|---|
${s1} | castle | ${fn:indexOf(s1, "castle")} |
${s1} | cloud | ${fn:indexOf(s1, "cloud")} |
${s1} | null | ${fn:indexOf(s1, undefined)} |
${s1} | empty string | ${fn:indexOf(s1, "")} |
null | castle | ${fn:indexOf(undefined, "castle")} |
null | empty string | ${fn:indexOf(undefined, "")} |