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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 12 15:01:32 2024 UTC