当前位置: 首页 > 网络学院 > 客户端脚本教程 > VBScript > VBScript Right 函数
The Right function returns a specified number of characters from the right side of a string.
Right 函数可从字符串右边返回指定数目的字符。
Tip: Use the Len function to find the number of characters in a string.
提示:要确定 string 参数中的字符数目,使用 Len 函数
Tip: Also look at the Left function.
提示:还可以参考下Left函数
Right(string,length) |
参数 | 描述 |
---|---|
string | Required. The string to return characters from 必选项。字符串表达式,其最右边的字符被返回。 |
length | Required. Specifies how many characters to return. If set to 0, an empty string ("") is returned. If set to greater than or equal to the length of the string, the entire string is returned 必选项。数值表达式,指明要返回的字符数目。如果为 0,返回零长度字符串;如果此数大于或等于 string 参数中的所有字符数目,则返回整个字符串。 |
dim txt 输出: utiful day! |
dim txt 输出: This is a beautiful day! |
dim txt,x 输出: This is a beautiful day! |