%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64 User : addictionfreeind ( 1003) PHP Version : 7.2.34 Disable Function : exec,passthru,shell_exec,system Directory : /home/addictionfreeind/public_html/admin1/vendor/phpro/grumphp/src/Util/ |
Upload File : |
<?php
declare(strict_types=1);
namespace GrumPHP\Util;
final class Str
{
/**
* String contains one of the provided needles
*/
public static function containsOneOf(string $haystack, array $needles): bool
{
foreach ($needles as $needle) {
if ($needle !== '' && mb_strpos($haystack, $needle) !== false) {
return true;
}
}
return false;
}
/**
* Split $value on ",", trim the individual parts and
* de-deduplicate the remaining values
*/
public static function explodeWithCleanup(string $delimiter, string $value): array
{
return array_unique(array_map(function (string $value) {
return trim($value);
}, array_filter(explode($delimiter, $value))));
}
}