php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8367 Wordwrap not cutting correctly
Submitted: 2000-12-21 17:02 UTC Modified: 2001-01-18 16:48 UTC
From: millz at incogen dot com Assigned: derick (profile)
Status: Closed Package: Strings related
PHP Version: 4.0.3pl1 OS: Solaris 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: millz at incogen dot com
New email:
PHP Version: OS:

 

 [2000-12-21 17:02 UTC] millz at incogen dot com
Calling wordwrap like this:
$sequence = "aaadaaadaaadaaada";
$sequence = wordwrap( $sequence, 4, "\n",1);

The \n is inserted correctly at the first position (just after pos 3), but is off by +1 for the remaining inserts.

Sequence becomes:
aaad
aaada
aadaa
ada

Where it should be:
aaad
aaad
aaad
aaad
a

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-08 13:28 UTC] cynic@php.net
confirmed in mod_php4 php4-200101080345
 [2001-01-08 13:31 UTC] derick@php.net
Adding this to my TODO list.
 [2001-01-18 16:48 UTC] derick@php.net
Fixed in CVS
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Jul 23 22:01:28 2019 UTC