VBScript Right 函数
❮ VBScript 参考大全
Right 函数从字符串的右侧返回指定数量的字符。
提示:使用 Len 函数查找字符串中的字符数。
提示:还可以查看 Left 函数。
语法
Right(string,length)
参数 | 描述 |
---|---|
string | 必需。要从中返回字符的字符串 |
length | 必需。指定要返回的字符数。如果设置为 0,则返回空字符串 ("")。如果设置为大于或等于字符串长度,则返回整个字符串 |
示例
示例 2
返回整个字符串
<%
txt="This is a beautiful day!"
x=Len(txt)
response.write(Right(txt,x))
%>
上面代码的输出将是
This is a beautiful day!
显示示例 »
❮ VBScript 参考大全