Files
nuhodds_fi4/app/Livewire/Mapper/SearchString.php
T
2026-10-04 15:25:03 +02:00

23 lines
431 B
PHP

<?php
namespace App\Livewire\Mapper;
class SearchString
{
public static function explode($string)
{
$string = str_replace([',', '/', '&'], '', $string);
$tmp = preg_split('/\s+/', $string, -1, PREG_SPLIT_NO_EMPTY);
$return = [];
foreach ($tmp as $value) {
if (strlen($value) > 1) {
$return[] = $value;
}
}
return $return;
}
}