right()

Read(1739) Label: string, right, substring,

Description:

Get a substring of a string ending at the rightmost side.

Syntax:

right(s,n)

Note:

The function gets a substring from source string s starting from the nth-to-last character to the end. If n<0, get a substring starting from the abs(n)th character to the end.

Parameter:

s

The source string

n

The nth-to-last character of source string s; return an empty string when the absolute value of n is greater than the length of s

Return value:

String

Example:

right("abced",2)

"ed"

right("abced",-2)

"bced"

right("abced",-8)

Return an empty string

Related function:

left()

mid()