VBScript Right Function
Complete VBScript Reference Manual
The Right function returns a specified number of characters from the right side of a string.
**Tip:** Use the Len function to determine the number of characters in a string.
**Tip:** See also the Left function.
Syntax
Right(string,length)
| Parameters | Description |
|---|---|
| string | Required. The string from which to return the characters. |
| length | Required. Specifies how many characters to return. If set to 0, an empty string ("") is returned. If set to a value greater than or equal to the length of the string, the entire string is returned. |
Example
Example 1
The example above produces the following output:
tiful day!
Try it »
Example 2
Return the entire string:
The example above produces the following output:
This is a beautiful day!
Try it »
Complete VBScript Reference Manual