]> granicus.if.org Git - php/commitdiff
(ucwords) Remove unnecessary code.
authorJouni Ahto <jah@php.net>
Thu, 1 Jun 2000 14:56:28 +0000 (14:56 +0000)
committerJouni Ahto <jah@php.net>
Thu, 1 Jun 2000 14:56:28 +0000 (14:56 +0000)
# Didn't keep my promise to stop...

ext/standard/string.c

index da8f1d96b6b0e52be921b93d4e583c2571e42601..db1d6909bfdf865af399c72bd1f4a4151d139d07 100644 (file)
@@ -1154,11 +1154,8 @@ PHP_FUNCTION(ucwords)
        r=return_value->value.str.val;
        *r=toupper((unsigned char)*r);
        for(r_end = r + return_value->value.str.len - 1 ; r < r_end ; ) {
-               if(isspace((int)*r)) {
-                       r++;
+               if(isspace((int)*r++)) {
                        *r=toupper((unsigned char)*r);
-               } else {
-                       r++;
                }
        }
 }