WordPress at a glance
function is not described

normalize_whitespace() WP 2.7.0

Normalize EOL characters and strip duplicate whitespace.

No Hooks.

Return

String. The normalized string.

Usage

normalize_whitespace( $str );
$str(string) (required)
The string to normalize.

Code of normalize whitespace: wp-includes/formatting.php VER 5.0.3

<?php
function normalize_whitespace( $str ) {
	$str  = trim( $str );
	$str  = str_replace( "\r", "\n", $str );
	$str  = preg_replace( array( '/\n+/', '/[ \t]+/' ), array( "\n", ' ' ), $str );
	return $str;
}