wiki/content/20201116130503-containsany.md

20 lines
391 B
Markdown
Raw Normal View History

2024-05-06 20:40:05 +00:00
---
2024-10-30 17:04:36 +00:00
date: 20201116
2024-05-06 20:40:05 +00:00
id: 14687f1c-7f7a-435f-824a-ab14bef7c12b
title: containsAny()
---
# Description
Checks if string contains at least one of all passed strings.
# Syntax
``` php
use function Symfony\Component\String\u;
u('aeiou')->containsAny('a'); // true
u('aeiou')->containsAny(['ab', 'efg']); // false
u('aeiou')->containsAny(['eio', 'foo', 'z']); // true
```