Answers for "recognize persian or english word php"

PHP
1

recognize persian or english word php

// تشخیص کلمه فارسی و انگلیسی

    public function isEnglish($str): bool
    {
        return strlen($str) == mb_strlen($str, 'utf-8');
    }

    public function webStandIsRTL(string $string): bool
    {
        if (preg_match('/^[^\x{600}-\x{6FF}]+$/u', str_replace("\\\\", "", $string))) {
            return false;
        }
        return true;
    }
Posted by: Guest on September-25-2021

Code answers related to "recognize persian or english word php"

Browse Popular Code Answers by Language