From: Jeroen van Wolffelaar Date: Sun, 23 Sep 2001 18:32:46 +0000 (+0000) Subject: Make chop the alias and rtrim the main function, in order to get automagically X-Git-Tag: PRE_SUBST_Z_MACROS~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f61dfce39c5865d0d6103aa85640da9f9a58bf39;p=php Make chop the alias and rtrim the main function, in order to get automagically generated alias-listings correct. --- diff --git a/ext/cybercash/cyberlib.php b/ext/cybercash/cyberlib.php index 0b26236392..fa183ff93b 100644 --- a/ext/cybercash/cyberlib.php +++ b/ext/cybercash/cyberlib.php @@ -36,7 +36,7 @@ $more=list($key,$val)=each($CCNVList); while(!$done) { - $pairs.=chop($key)."=".urlencode(chop($val)); + $pairs.=rtrim($key)."=".urlencode(rtrim($val)); $more=list($key,$val)=each($CCNVList); if($more) diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 8c6cdf8d0e..ef2fc7ca07 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -333,7 +333,7 @@ function_entry basic_functions[] = { PHP_FE(strtr, NULL) PHP_FE(addslashes, NULL) PHP_FE(addcslashes, NULL) - PHP_FE(chop, NULL) + PHP_FE(rtrim, NULL) PHP_FE(str_replace, NULL) PHP_FE(str_repeat, NULL) PHP_FE(count_chars, NULL) @@ -359,7 +359,7 @@ function_entry basic_functions[] = { PHP_FE(ord, NULL) PHP_FE(parse_str, second_arg_force_ref) PHP_FE(str_pad, NULL) - PHP_FALIAS(rtrim, chop, NULL) + PHP_FALIAS(chop, rtrim, NULL) PHP_FALIAS(strchr, strstr, NULL) PHP_NAMED_FE(sprintf, PHP_FN(user_sprintf), NULL) PHP_NAMED_FE(printf, PHP_FN(user_printf), NULL) diff --git a/ext/standard/php_string.h b/ext/standard/php_string.h index 8bf3e30eb1..93fa8691c4 100644 --- a/ext/standard/php_string.h +++ b/ext/standard/php_string.h @@ -27,7 +27,7 @@ PHP_FUNCTION(strspn); PHP_FUNCTION(strcspn); PHP_FUNCTION(str_replace); -PHP_FUNCTION(chop); +PHP_FUNCTION(rtrim); PHP_FUNCTION(trim); PHP_FUNCTION(ltrim); PHP_FUNCTION(soundex); diff --git a/ext/standard/string.c b/ext/standard/string.c index a85926674e..30302c05c1 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -540,13 +540,13 @@ PHPAPI void php_trim2(zval **str, zval **what, zval *return_value, int mode TSRM } /* }}} */ -/* {{{ proto string rtrim(string str [, string character_mask]) - An alias for chop */ +/* {{{ proto string chop(string str [, string character_mask]) + An alias for rtrim */ /* }}} */ -/* {{{ proto string chop(string str [, string character_mask]) +/* {{{ proto string rtrim(string str [, string character_mask]) Removes trailing whitespace */ -PHP_FUNCTION(chop) +PHP_FUNCTION(rtrim) { zval **str; zval **what = NULL;