wiki/content/20201113115452-str_ends_with.md

22 lines
395 B
Markdown
Raw Normal View History

2024-05-06 20:40:05 +00:00
---
2024-10-30 17:04:36 +00:00
date: 20201113
2024-05-06 20:40:05 +00:00
id: 43cb053d-03b0-4845-a804-5e34da5d8db5
title: str~endswith~()
---
# Description
Check if string ends with other string. Opposite of
[str~startswith~()](20201113115424-str_starts_with). See RFC[^1] for
more details.
# Syntax
``` php
str_ends_with('haystack', 'stack') // true
```
# Footnotes
[^1]: <https://wiki.php.net/rfc/add_str_starts_with_and_ends_with_functions>