Make chop the alias and rtrim the main function, in order to get automagically

generated alias-listings correct.
This commit is contained in:
Jeroen van Wolffelaar 2001-09-23 18:32:46 +00:00
parent db1fe4b060
commit f61dfce39c
4 changed files with 8 additions and 8 deletions

View file

@ -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)

View file

@ -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)

View file

@ -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);

View file

@ -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;