Re: [PHP-DEV] Fix for wordwrap()

2003-03-08 Thread Tom Sommer
On Fri, 7 Mar 2003 08:20:19 +0100, Jedi/Sector One wrote: $a = w\nphprules\nw; print wordwrap($a, 10, 'br /', 10); Output : wwbr /wwbr /w phprbr /ules wbr / It's not it breaks with br / after 10 chars by force, because

Re: [PHP-DEV] Fix for wordwrap()

2003-03-08 Thread Derick Rethans
On Sun, 9 Mar 2003, Tom Sommer wrote: PS. cut should had been a boolean, IMHO :) It is: zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|lsb (b = boolean) Derick -- my other box is your windows PC

Re: [PHP-DEV] Fix for wordwrap()

2003-03-08 Thread Tom Sommer
On Sun, 9 Mar 2003 01:05:01 +0100 (CET), Derick Rethans wrote: It is: zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|lsb (b = boolean) Ok, the documentation says it is an integer... (ofcause true == 1, but still) -- Tom Sommer, denmark www.tsn.dk - www.dreamcoder.dk -- PHP

Re: [PHP-DEV] Fix for wordwrap()

2003-03-08 Thread Derick Rethans
On Sun, 9 Mar 2003, Tom Sommer wrote: On Sun, 9 Mar 2003 01:05:01 +0100 (CET), Derick Rethans wrote: It is: zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|lsb (b = boolean) Ok, the documentation says it is an integer... (ofcause true == 1, but still) Docs were wrong, I just

Re: [PHP-DEV] Fix for wordwrap()

2003-03-08 Thread Tom Sommer
On Sun, 9 Mar 2003 01:07:53 +0100 (CET), Derick Rethans wrote: Docs were wrong, I just fixed that. methodparam choice=opttypeboolean/typeparametercut/parameter/methodparam should be methodparam choice=opttypebool/typeparametercut/parameter/methodparam since all other doc elements use bool

Re: [PHP-DEV] Fix for wordwrap()

2003-03-08 Thread Tom Sommer
On Sun, 9 Mar 2003 01:07:53 +0100 (CET), Derick Rethans wrote: Docs were wrong, I just fixed that. oh, and the examples and the text about cut needs to be changed to :) If the parametercut/parameter is set to *1* -- Tom Sommer, denmark www.tsn.dk - www.dreamcoder.dk -- PHP Development

[PHP-DEV] Fix for wordwrap()

2003-03-06 Thread Jedi/Sector One
Hello. Maybe this is the intended behavior, but wordwrap()'s behavior is a bit illogical on PHP 4.3.1, as it does only break after a plain whitespace, not after punctuation, \n, etc. Here's a trivial sample : $a = ww\nphprules\nw; print wordwrap($a, 10,

Re: [PHP-DEV] Fix for wordwrap()

2003-03-06 Thread Ilia A.
On March 6, 2003 06:52 am, Jedi/Sector One wrote: Hello. Maybe this is the intended behavior, but wordwrap()'s behavior is a bit illogical on PHP 4.3.1, as it does only break after a plain whitespace, not after punctuation, \n, etc. Here's a trivial sample : $a =

Re: [PHP-DEV] Fix for wordwrap()

2003-03-06 Thread Jedi/Sector One
On Thu, Mar 06, 2003 at 09:53:22AM -0500, Ilia A. wrote: you are hardcoding the 'break' as ' ', meaning that no other character is considered a space hence The documentation states that 'break' is what is used to break lines, not what is considered a space. Simple try with PHP 4.3.1 :