php 在 TWIG 中查找字符串中的子字符串
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13007288/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Find substring in the string in TWIG
提问by user1440167
I want to find substring of the string or check if there is no such substring using Twig. On the words, I need analogue of 'strstr' or 'strpos' in php. I googled and searched this issue in stackoverflow but nothing found. Does someone know how to solve this problem?
我想找到字符串的子字符串或使用 Twig 检查是否没有这样的子字符串。在单词上,我需要在 php 中类似于“strstr”或“strpos”。我在stackoverflow中用谷歌搜索并搜索了这个问题,但没有找到。有人知道如何解决这个问题吗?

