- JSP 基本教程
- JSP - 主页
- JSP - 概览
- JSP - 环境设置
- JSP - 架构
- JSP - 生命周期
- JSP - 语法
- JSP - 指令
- JSP - 动作
- JSP - 隐式对象
- JSP - 客户端请求
- JSP - 服务器响应
- JSP - Http 状态码
- JSP - 表单处理
- JSP - 编写过滤器
- JSP - Cookie 处理
- JSP - 会话跟踪
- JSP - 文件上传
- JSP - 处理日期
- JSP - 页面重定向
- JSP - 统计器
- JSP - 自动刷新
- JSP - 发送电子邮件
- JSP 高级教程
- JSP - 标准标记库
- JSP - 数据库访问
- JSP - XML 数据
- JSP - Java Bean
- JSP - 自定义标记
- JSP - 表达式语言
- JSP - 异常处理
- JSP - 调试
- JSP - 安全
- JSP - 国际化
- JSP 有用资源
- JSP - 问题和答案
- JSP - 快速指南
- JSP - 有用资源
- JSP - 讨论
JSTL - fn:containsIgnoreCase() 函数
fn:containsIgnoreCase() 函数确定一个输入字符串是否包含一个指定的子字符串。在进行搜索时,它会忽略大小写。
语法
fn:containsIgnoreCase() 函数有以下语法 -
boolean containsIgnoreCase(java.lang.String, java.lang.String)
示例
以下是解释 fn:containsIgnoreCase() 函数功能的示例 -
<%@ 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>Using JSTL Functions</title>
</head>
<body>
<c:set var = "theString" value = "I am a test String"/>
<c:if test = "${fn:containsIgnoreCase(theString, 'test')}">
<p>Found test string<p>
</c:if>
<c:if test = "${fn:containsIgnoreCase(theString, 'TEST')}">
<p>Found TEST string<p>
</c:if>
</body>
</html>
您将收到以下结果 -
Found test string Found TEST string
jsp_standard_tag_library.htm
广告