Requests_IDNAEncoder::digit_to_char( int $digit )

Convert a digit to its respective character


Description Description

See also See also


Top ↑

Parameters Parameters

$digit

(int) (Required) Digit in the range 0-35


Top ↑

Return Return

(string) Single character corresponding to digit


Top ↑

Source Source

File: wp-includes/Requests/IDNAEncoder.php

	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);
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.