Automattic\WooCommerce\Vendor\GraphQL\Utils

Utils::printCharCodepublic staticWC 1.0

Метод класса: Utils{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$result = Utils::printCharCode( ?int $code ): string;
?int $code(обязательный)
.

Код Utils::printCharCode() WC 11.0.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) . '"';
}