RIGHT


Returns the rightmost substring of a string

Syntax:
Usage:
result = Right[$]( str, n )

Parameters:
str
The source string.
n
The substring length, in characters.

Return Value:
Returns the rightmost substring from str.

Description:
Returns the rightmost n characters starting from the right (end) of str. If str is empty, then the null string ("") is returned. If n <= 0 then the null string ("") is returned. If n > len(str) then the entire source string is returned.

Examples:
Dim text As String = "hello world"
Print Right(text, 5)
will produce the output:

world

An Unicode example:

dim text as wstring*20
text = "Привет, мир!"
print right(text, 5) 'displays " мир!"
 

Platform Differences:
Dialect Differences:
Differences from QB:
See also:
Back to String Functions
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode