use*_*167 124 php substring comparison-operators twig
我想找到字符串的子字符串或使用Twig检查是否没有这样的子字符串.换句话说,我需要在php中使用'strstr'或'strpos'的模拟.我用Google搜索并在stackoverflow中搜索了这个问题,但没有找到.有人知道如何解决这个问题吗?
Ham*_*mZa 328
遏制操作员:输入操作员执行遏制测试.如果左操作数包含在右侧,则返回true:
{# returns true #}
{{ 1 in [1, 2, 3] }}
{{ 'cd' in 'abcde' }}
Run Code Online (Sandbox Code Playgroud)