wiki/content/20201116130503-containsany.md

376 B

id title
14687f1c-7f7a-435f-824a-ab14bef7c12b containsAny()

Description

Checks if string contains at least one of all passed strings.

Syntax

use function Symfony\Component\String\u;

u('aeiou')->containsAny('a');                 // true
u('aeiou')->containsAny(['ab', 'efg']);       // false
u('aeiou')->containsAny(['eio', 'foo', 'z']); // true