From: Hartmut Holzgraefe Date: Thu, 1 Jun 2000 09:56:54 +0000 (+0000) Subject: ucwords will now test against isspace() instead of just ==" " X-Git-Tag: PRE_EIGHT_BYTE_ALLOC_PATCH~160 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f27956eb1920aa145a8d541d0916d0e4c6fb7795;p=php ucwords will now test against isspace() instead of just ==" " (see BUG #4748) --- diff --git a/ext/standard/string.c b/ext/standard/string.c index faabe4c702..c46b8817e3 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1155,12 +1155,14 @@ PHP_FUNCTION(ucwords) r=return_value->value.str.val; r_end = r + (*str)->value.str.len; - while((r=php_memnstr(r, " ", 1, r_end)) != NULL){ - if(r < r_end){ - r++; - *r=toupper((unsigned char)*r); - } else { - break; + while(++r