我正在使用像“James“Jim”Smith”这样的输入字符串,其中一个人的昵称在字符串中用双引号引起来。我一直试图使用 contains 运算符来查找一个人是否有昵称,但它从未找到带双引号的条目。举个例子:
<-- Name - James "Jim" Smith -->
{% if Name contains '\"' %}
Do Something
{% else %}
Always gets here
{% endif %}
Run Code Online (Sandbox Code Playgroud)
如何使用 contains(或 split)在字符串中搜索文字双引号?
liquid ×1