Right$

String management function.

The Right$ function returns the specified number of characters in a string starting from the right.

Syntax

var$=Right$(<string$>,<numcar>)

Parameters

<string$>, string from which to extract characters.

<numcar>, numeric, number of characters to extract from <string$>.

Return value

var$, string, return value containing the extracted characters. If <numcar> is negative or 0, an empty string is returned. If <numcar> is greater than or equal to the number of characters of <string$>, the entire string is returned.

See also

ExtractBetween$

Left$, Mid$

Examples

 

a$ = Right$("example",3) ' Returns "ple" in a$

a$ = Right$("example",0) ' Returns "" in a$