WordPress at a glance
function is not described

Requests_IDNAEncoder::encode() public WP 1.0

Encode a hostname using Punycode

{} It's a method of the class: Requests_IDNAEncoder{}

No Hooks.

Return

String. Punycode-encoded hostname

Usage

$result = Requests_IDNAEncoder::encode( $string );
$string(string) (required)
Hostname

Code of Requests_IDNAEncoder::encode() WP 5.5.1

<?php
public static function encode($string) {
	$parts = explode('.', $string);
	foreach ($parts as &$part) {
		$part = self::to_ascii($part);
	}
	return implode('.', $parts);
}