Returns a specified number of characters from the right side of a string.

 

When character count is less than 1, the empty string is returned.

 

Should the length value be for a character count that is greater than, or equal to the number of characters in string, the entire character contents of the string is returned.

 

Syntax:

value = RightCharacters( inputString )

OR

value = Right( inputString )     '   Short form usage: "Right"

 

Parameter:

Description:

inputString

String from which to extract the right-side characters.

length

Number of characters on the right side of text to extract.

value

Extracted characters.

 

Example:

value = Right( "Hello", 3 )           '  Returns "llo"
value = Right( "Hello", 2 )           '  Returns "lo"
value = RightCharacters( "Hello", 5 ) '  Returns "Hello"

 

Results:

See example comments.

 

Links:

LeftCharacters, MiddleCharacters

See Also:

Data Groups and Types

 


Edit Time: 9/18/2020 1:56:07 PM


Topic ID#: 33

 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software