WP_CLI\Utils
normalize_eols()
Convert Windows EOLs to *nix.
No Hooks.
Returns
String. String with carriage return / newline pairs reduced to newlines.
Usage
normalize_eols( $str );
- $str(string) (required)
- String to convert.
normalize_eols() normalize eols code WP-CLI 2.13.0-alpha
function normalize_eols( $str ) {
return str_replace( "\r\n", "\n", $str );
}