- 论坛徽章:
- 0
|
rtrim()函数的作用是:去除字符串末尾的空白(或其它字符)。
语法
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:
可选参数。指定需要从指定的字符串中删掉那些字符。如果忽略该参数,那么下列所有的字符将都被删除:
- "/0" - NULL
"/0" – NULL(空值)
- "/t" - tab
"/t" – tab(制表符)
- "/n" - new line
"/n" –new line(新行)
- "/x0B" - vertical tab
"/x0B" – vertical tab(垂直制表符)
- "/r" - carriage return
"/r" –carriage return(回车)
- " " - ordinary white space
" " –ordinary white space(空格)
都打印出AAAA,因为第二个参数的意思是从指定的字符串中删掉那些字符。
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/106588/showart_2152499.html |
|