From:             mikael at whip3 dot net
Operating system: Windows XP
PHP version:      4.3.0
PHP Bug Type:     Feature/Change Request
Bug description:  wordwrap removes space at break, could be optional?

The function wordwrap removes on space character if a break occurs between
two words. This is not always desired behavior.

For example:

echo wordwrap('abc abc abc    abc', 13, 'X', 1);

Note: 4 spaces between last pair

Results in:
abc abc abc  X abc

Two spaces left before the break and one after. One space gets removed.
The same happens if we only have one space where a line break occurres,
leaving us with only a line break between the words.

/ mikael


-- 
Edit bug report at http://bugs.php.net/?id=22487&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=22487&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=22487&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=22487&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=22487&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=22487&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=22487&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=22487&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=22487&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=22487&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=22487&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22487&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=22487&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=22487&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=22487&r=gnused

Reply via email to