Removes specified characters from any position in the string

How to remove the specified characters in any position of the string in Anqi CMS template?

cutThe filter can remove specified characters from any position in the string. If you remove special characters, spaces, etc., you can use itcutFilter

How to use

cutHow to use filters:

{{ obj|cut:"Keyword" }}

For exampletestIn-housesRemove, you can write:

{{ "test"|cut:"s" }}
# Show results
tet

Sample Demo

{{ 15|cut:"5" }}
{{ "Hello world"|cut: " " }}
# Show result
1
Helloworld