public static function splitWordsWithCase($str)
{
$non_word = '\x{0000}-\x{002F}\x{003A}-\x{0040}\x{005b}-\x{0060}\x{007B}-\x{007E}\x{00A0}-\x{00BF}\s';
- if (preg_match_all('/([^' . $non_word . ']{3,})/msu', html::clean($str), $match)) {
+ if (preg_match_all('/([^' . $non_word . ']{3,})/msu', $str, $match)) {
foreach ($match[1] as $i => $v) {
$match[1][$i] = $v;
}
return $text;
}
- public static function fileGetContentsNormalizedLines($path){
+ public static function fileGetContentsNormalizedLines($path)
+ {
return static::normalizeLines(file_get_contents($path));
}
public static function splitWords($str, $minChar = 3)
{
$non_word = '\x{0000}-\x{002F}\x{003A}-\x{0040}\x{005b}-\x{0060}\x{007B}-\x{007E}\x{00A0}-\x{00BF}\s';
- if (preg_match_all('/([^' . $non_word . ']{' . $minChar . ',})/msu', html::clean($str), $match)) {
+ if (preg_match_all('/([^' . $non_word . ']{' . $minChar . ',})/msu', $str, $match)) {
foreach ($match[1] as $i => $v) {
$match[1][$i] = mb_strtolower($v);
}
return $match[1];
}
- return array();
+ return [];
}
/**