Requests_IDNAEncoder::digit_to_char()protected staticWP 1.0

Convert a digit to its respective character

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

Хуков нет.

Возвращает

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

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

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

Заметки

Код Requests_IDNAEncoder::digit_to_char() WP 6.1.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 Requests_Exception(sprintf('Invalid digit %d', $digit), 'idna.invalid_digit', $digit);
	}
	// @codeCoverageIgnoreEnd
	$digits = 'abcdefghijklmnopqrstuvwxyz0123456789';
	return substr($digits, $digit, 1);
}