Requests_IDNAEncoder::is_ascii

Advertisement

Summery Summery

Check whether a given string contains only ASCII characters

Syntax Syntax

Requests_IDNAEncoder::is_ascii( string $string )

Parameters Parameters

$string

(string) (Required)

Return Return

(bool) Is the string ASCII-only?

Source Source

File: wp-includes/Requests/IDNAEncoder.php

	protected static function is_ascii($string) {
		return (preg_match('/(?:[^\x00-\x7F])/', $string) !== 1);
	}

Advertisement

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.