WpOrg\Requests
IdnaEncoder::is_ascii()
Check whether a given text string contains only ASCII characters
Method of the class: IdnaEncoder{}
No Hooks.
Return
true|false
. Is the text string ASCII-only?
Usage
$result = IdnaEncoder::is_ascii( $text );
- $text(string) (required)
- Text to examine.
IdnaEncoder::is_ascii() IdnaEncoder::is ascii code WP 6.6.2
protected static function is_ascii($text) { return (preg_match('/(?:[^\x00-\x7F])/', $text) !== 1); }