flosch / pongo2

Django-syntax like template-engine for Go
https://www.schlachter.tech/pongo2
MIT License
2.87k stars 270 forks source link

need strings function #344

Open zhangguanzhang opened 9 months ago

zhangguanzhang commented 9 months ago
{% set my_string = "abc" %}

{{ my_string.startswith('a') }}
{{ my_string.endswith('c') }}
{{ my_string.upper() }}
{{ my_string.lower() }}
{{ my_string.replace('a', 'x') }}
{{ my_string.strip() }}
{{ my_string.split('b') }}

output


True
True
ABC
abc
xbc
abc
['a', 'c']
zhangguanzhang commented 9 months ago

github.com/nikolalohinski/gonja help me