right()

var name = String.right("Mr Smith",5)

Note:

The Return Value in the example above would be "Smith". Therefore, the variable name will contain the value "Smith".

Close