/ lang / right
Right$
Syntax

    Result = Right$ ( String AS String [ , Length AS Integer ] )
    Result = Right ( String AS String [ , Length AS Integer ] )

Returns the Length last characters of a string.

If Length is not specified, the last character of the string is returned.

If Length is negative, all the string except the (- Length ) first characters is returned.

### Examples

    PRINT Right$("Gambas", 4)
    <hr>mbas

    PRINT Right$("Gambas")
    <hr>s

    PRINT Right$("Gambas", -1)
    <hr>ambas

### See also

String Functions