From d1bbd5843ff6f2c6911aa7f7d15067504b6f0ca0 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Sun, 10 Dec 2006 05:11:28 -0500 Subject: [PATCH] added unix_newlines() --- basics.php | 6 ++++++ 1 file changed, 6 insertions(+) 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); +} + + ?> -- 1.7.10.4