nativegallery-weryskok/app/Services/Word.php

20 lines
277 B
PHP
Raw Normal View History

2024-07-04 13:09:20 +03:00
<?php
namespace App\Services;
use App\Services\GenerateRandomStr;
class Word
{
public static function strlen($word)
{
$len = strlen($word);
if (preg_match("/[\p{Cyrillic}]/u", $word)) {
$len /= 2;
}
return $len;
}
}