分类:
2010-01-18 23:38:59
rtrim(string,charlist) |
Parameter参数 | Description描述 |
---|---|
string | Required. Specifies the string to check 必要参数。指定字符串对象 |
charlist | Optional. Specifies which characters to remove from the string. If omitted, all of the following characters are removed: 可选参数。指定需要从指定的字符串中删掉那些字符。如果忽略该参数,那么下列所有的字符将都被删除:
|
$str = 'AAAAB B';
echo rtrim($str, ' B'),'
';
$str = 'AAAAB BC';
echo rtrim($str, ' BC'),'
';
?>
都打印出AAAA,因为第二个参数的意思是从指定的字符串中删掉那些字符。