WpOrg\Requests
IdnaEncoder::is_ascii()
Check whether a given text string contains only ASCII characters
Метод класса: IdnaEncoder{}
Хуков нет.
Возвращает
true|false
. Is the text string ASCII-only?
Использование
$result = IdnaEncoder::is_ascii( $text );
- $text(строка) (обязательный)
- Text to examine.
Код IdnaEncoder::is_ascii() IdnaEncoder::is ascii WP 6.3.1
protected static function is_ascii($text) { return (preg_match('/(?:[^\x00-\x7F])/', $text) !== 1); }