Automattic\WooCommerce\Vendor\GraphQL\Utils
Utils::printCharCode
Method of the class: Utils{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = Utils::printCharCode( ?int $code ): string;
- ?int $code(required)
- .
Utils::printCharCode() Utils::printCharCode code WC 10.8.1
public static function printCharCode(?int $code): string
{
if ($code === null) {
return '<EOF>';
}
return $code < 0x007F
// Trust JSON for ASCII
? json_encode(self::chr($code), JSON_THROW_ON_ERROR)
// Otherwise, print the escaped form
: '"\\u' . dechex($code) . '"';
}