Name
fn:containsIgnoreCase
Synopsis
This
function tests if a string contains a substring regardless of the
character case, and returns true
if it does,
otherwise false
.
Syntax
boolean: fn:containsIgnoreCase(string
,substring
)
Parameters
Parameter name |
Java type |
Description |
string |
String |
The string to test. |
substring |
String |
The substring to look for. |
Example
<c:if test="${fn:containsIgnoreCase(param:answer, 'YES')}
">
You answered Yes (or YES, or yes, or YEs, or ...)
</c:if>
Get JavaServer Pages, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.