lektor-website/content/docs/api/db/expression/endswith/contents.lr

25 lines
528 B
Plaintext
Raw Normal View History

2015-12-19 14:52:17 +01:00
title: endswith
---
summary: True if a string ends with another string (case insensitive).
---
type: method
---
signature: other
---
body:
This evaluates to true if the [string :ref](../../types/string/)
on the left side ends with the string on the right side. This method
operates in a case-insensitive manner. For the case-sensitive method
see [endswith_cs :ref](../endswith-cs/).
## Example
```html+jinja
<ul>
{% for item in this.children.filter(F.name.endswith('house')) %}
<li>{{ item.name }}
{% endfor %}
</ul>
```