IndexOf in Velocity report?
-
10-10-2019 - |
Question
Is there some equivalent of javascripts indexOf in Velocity? I want to test whether some string is contained within another string but I can't find the proper string operator for it.
Solution
Velocity allows you to use all Java methods available in your objects. So just write as if it was Java:
$string1.indexOf($string2)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow