From: Jason Woofenden Date: Sun, 10 Dec 2006 10:11:28 +0000 (-0500) Subject: added unix_newlines() X-Git-Url: https://jasonwoof.com/gitweb/?a=commitdiff_plain;h=d1bbd5843ff6f2c6911aa7f7d15067504b6f0ca0;p=wfpl.git added unix_newlines() --- diff --git a/basics.php b/basics.php index 3a60248..72a33a3 100644 --- a/basics.php +++ b/basics.php @@ -10,4 +10,10 @@ function read_whole_file($name) { return $temp; } +function unix_newlines($str) { + $str = str_replace("\r\n", "\n", $str); + return str_replace("\r", "\n", $str); +} + + ?>