Method
Right
Warning
This item was deprecated in version 2019r2. Please use String.Right as a replacement.
Description
Returns the last n characters from the string specified.
Usage
result = sourceVariable.Right(count)
Part |
Type |
Description |
---|---|---|
result |
The rightmost count characters of source. |
|
sourceVariable |
The source string from which to get the characters. |
|
count |
The number of characters you wish to get from the 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 MemoryBlock class.
Sample code
This example uses the Right function to return the last 5 characters from a String:
Var result As String
Var source As String = "Hello World"
result = source.Right(5) ' returns "World"
Compatibility
All project types on all supported operating systems.
See also
String for a complete list of functions.