Home > Language Reference > Functions > Strings

Right Function

Extracts characters from the right side of a string.

Syntax

Public Function Right(ByRef sString As String, ByVal iCount As Integer) As String

ParameterDescription
sStringString from which the rightmost characters are returned.
iCountNumber of characters to return.

Remarks

If the value of iCount is less than zero, a runtime error will occur. If its value is equal to or greater than the length of sString, the whole string is returned. If iCount is null or if sString is empty, an empty string is returned. The string parameter sString passed to the function Right is not modified.

You can extract characters from the left hand side of a string using the function Left and extract characters from inside a string using the function Mid.

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 3.0-
Windows CEWindows CE 3.0-