Remove specified characters from any position in a string

How to remove a specified character from any position in a string in Anqi CMS template?

cutThe filter can remove specified characters from any position in a string. Operations such as removing special characters, spaces, etc., can be performed using it.cutFilter

Usage Instructions

cutHow to use the filter:

{{ obj|cut:"关键词" }}

For example, to transformtesttosremove, it can be written as:

{{ "test"|cut:"s" }}
# 显示结果
tet

Here is an example demonstration

{{ 15|cut:"5" }}
{{ "Hello world"|cut: " " }}
# 显示结果
1
Helloworld