最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - IndexOf in Velocity report? - Stack Overflow

programmeradmin1浏览0评论

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.

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.

Share Improve this question asked Nov 14, 2010 at 16:30 BitsplitterBitsplitter 9807 silver badges17 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6

Velocity allows you to use all Java methods available in your objects. So just write as if it was Java:

$string1.indexOf($string2)
发布评论

评论列表(0)

  1. 暂无评论