public function convertNewlines($string) {
        $string = str_replace("\r\n", "\n", $string);
        $string = str_replace("\r", "\n", $string);

        return $this->cleanNewlines($string);
    }
public function convertNewlines($string) {
        $string = str_replace("\r\n", "\n", $string);
        $string = str_replace("\r", "\n", $string);

        return $this->cleanNewlines($string);
    }
public function convertNewlines ( $ string ) { $ string = str_replace ( "\r\n" , "\n" , $ string ) ; $ string = str_replace ( "\r" , "\n" , $ string ) ; return $ this -> cleanNewlines ( $ string ) ; }
Convert carriage returns to newlines.

@param string $string
@return string
Convert carriage returns to newlines .