cvs: php4(PHP_4_2_0) /ext/standard string.c /ext/standard/tests/strings wordwrap.phpt

From: Date: Mon, 18 Mar 2002 02:05:07 +0000
Subject: cvs: php4(PHP_4_2_0) /ext/standard string.c /ext/standard/tests/strings wordwrap.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-10316@lists.php.net to get a copy of this message
jimw Sun Mar 17 21:05:07 2002 EDT Modified files: (Branch: PHP_4_2_0) /php4/ext/standard string.c /php4/ext/standard/tests/strings wordwrap.phpt Log: MFH Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.263 php4/ext/standard/string.c:1.263.2.1 --- php4/ext/standard/string.c:1.263 Sat Mar 2 09:06:57 2002 +++ php4/ext/standard/string.c Sun Mar 17 21:05:06 2002 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.263 2002/03/02 14:06:57 derick Exp $ */ +/* $Id: string.c,v 1.263.2.1 2002/03/18 02:05:06 jimw Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -662,7 +662,7 @@ else { /* Multiple character line break or forced cut */ if (linelength > 0) { - newtextlen = textlen + (textlen/linelength) * breakcharlen + 1; + newtextlen = textlen + (textlen/linelength + 1) * breakcharlen + 1; } else { newtextlen = textlen * (breakcharlen + 1) + 1; Index: php4/ext/standard/tests/strings/wordwrap.phpt diff -u php4/ext/standard/tests/strings/wordwrap.phpt:1.4 php4/ext/standard/tests/strings/wordwrap.phpt:1.4.2.1 --- php4/ext/standard/tests/strings/wordwrap.phpt:1.4 Tue Mar 5 04:00:56 2002 +++ php4/ext/standard/tests/strings/wordwrap.phpt Sun Mar 17 21:05:06 2002 @@ -27,6 +27,8 @@ "12345|12345|67890" === wordwrap("12345 1234567890", 5, "|", 1) +"123|==1234567890|==123" === wordwrap("123 1234567890 123", 10, "|==", 1) + TESTS; include('tests/quicktester.inc');

« previous php.cvs (#10316) next »