The best way to check the ends with () in & lt; s: if test = & ldquo; & rdquo; & gt; label including equalsIgnore case in Struts2


What is the best way to check if string ends with particular letters including equalsIgnore case.

I want to achieve something like below + ignore the case sensitivity only by using the struts2 tag and not the jstl tag.

<s:if test="(strDisplay.endsWith('XYZ'))">

Struts2 support function calls via OGNL.

<s:if test="strDisplay.toUpperCase().endsWith('XYZ')">