last(limit = 1)
public

Returns the last character of the string or the last limit characters.

Examples:

  "hello".last     # => "o"
  "hello".last(2)  # => "lo"
  "hello".last(10) # => "hello"