Right Function

Returns the last n characters from the String specified.

Syntax
result = Right( source, count )
result = stringVariable.Right( count )

Parameters
source | String | The source string from which to get the characters.
count | Integer | The number of characters you wish to get from the source. If count is greater than the length of source, all characters in source are returned.

Return Value
Result | String | The rightmost count characters of source.

# Notes

The Right function returns characters from the source string starting from the right side (as the name implies).

If you need to read bytes rather than characters, use the RightB function.

# Examples

This example uses the Right function to return the last 5 characters from a String

Dim s As String
s=Right("Hello World", 5) //returns "World"

.

# See Also

Asc, Chr, InStr, Left, Len, Mid functions; String data type.