WP_CLI\Utils

normalize_eols()WP-CLI 1.0

Convert Windows EOLs to *nix.

No Hooks.

Return

String. String with carriage return / newline pairs reduced to newlines.

Usage

normalize_eols( $str );
$str(string) (required)
String to convert.

normalize_eols() code WP-CLI 2.8.0-alpha

function normalize_eols( $str ) {
	return str_replace( "\r\n", "\n", $str );
}