How to remove a specified character at any position in a string in the Anqi CMS template?
cut
The filter can remove specified characters from any position in the string. If you remove special characters, spaces, etc., you can use itcut
Filter
How to use
cut
How to use filters:
{{ obj|cut:"关键词" }}
For exampletest
In-houses
Remove, you can write:
{{ "test"|cut:"s" }}
# 显示结果
tet
Sample Demo
{{ 15|cut:"5" }}
{{ "Hello world"|cut: " " }}
# 显示结果
1
Helloworld