WpOrg\Requests

IdnaEncoder::digit_to_char()protected staticWP 1.0

Convert a digit to its respective character

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

Хуков нет.

Возвращает

Строку. Single character corresponding to digit

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

$result = IdnaEncoder::digit_to_char( $digit );
$digit(int) (обязательный)
Digit in the range 0-35

Код IdnaEncoder::digit_to_char() WP 6.6.1

protected static function digit_to_char($digit) {
	// @codeCoverageIgnoreStart
	// As far as I know, this never happens, but still good to be sure.
	if ($digit < 0 || $digit > 35) {
		throw new Exception(sprintf('Invalid digit %d', $digit), 'idna.invalid_digit', $digit);
	}

	// @codeCoverageIgnoreEnd
	$digits = 'abcdefghijklmnopqrstuvwxyz0123456789';
	return substr($digits, $digit, 1);
}