WpOrg\Requests
IdnaEncoder::digit_to_char()
Convert a digit to its respective character
Method of the class: IdnaEncoder{}
No Hooks.
Return
String
. Single character corresponding to digit
Usage
$result = IdnaEncoder::digit_to_char( $digit );
- $digit(int) (required)
- Digit in the range 0-35
IdnaEncoder::digit_to_char() IdnaEncoder::digit to char code WP 6.6.2
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); }