On this page
Requests_IDNAEncoder::is_ascii( string $string ): bool
Check whether a given string contains only ASCII characters
Parameters
$stringstring Required
Return
bool Is the string ASCII-only?
Source
File: wp-includes/Requests/IDNAEncoder.php. View all references
protected static function is_ascii($string) {
return (preg_match('/(?:[^\x00-\x7F])/', $string) !== 1);
}
Related
Used By
| Used By | Description |
|---|---|
| Requests_IDNAEncoder::to_ascii() wp-includes/Requests/IDNAEncoder.php | Convert a UTF-8 string to an ASCII string using Punycode |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/requests_idnaencoder/is_ascii