Title: Requests_IDNAEncoder::nameprep
Published: August 16, 2016
Last modified: November 2, 2022

---

# Requests_IDNAEncoder::nameprep( string $string ): string

## In this article

 * [Parameters](https://developer.wordpress.org/reference/classes/requests_idnaencoder/nameprep/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/classes/requests_idnaencoder/nameprep/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/requests_idnaencoder/nameprep/?output_format=md#source)

[ Back to top](https://developer.wordpress.org/reference/classes/requests_idnaencoder/nameprep/?output_format=md#wp--skip-link--target)

Prepare a string for use as an IDNA name

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/requests_idnaencoder/nameprep/?output_format=md#parameters)󠁿

 `$string`stringrequired

## 󠀁[Return](https://developer.wordpress.org/reference/classes/requests_idnaencoder/nameprep/?output_format=md#return)󠁿

 string Prepared string

## 󠀁[Source](https://developer.wordpress.org/reference/classes/requests_idnaencoder/nameprep/?output_format=md#source)󠁿

[View all references](https://developer.wordpress.org/reference/files/wp-includes/requests/idnaencoder.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/Requests/IDNAEncoder.php#L125)

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Frequests_idnaencoder%2Fnameprep%2F)
before being able to contribute a note or feedback.