diff --git a/app/helpers.php b/app/helpers.php index 1901e07..70c1948 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -143,3 +143,10 @@ function formatTitle(string $str): string ->toString(); } } + +if (! function_exists('tokenizeString')) { + function tokenizeString(string $str): array + { + return preg_split('/\W+/', trim($str), -1, PREG_SPLIT_NO_EMPTY); + } +}