For the complete documentation index, see llms.txt. This page is also available as Markdown.

Tail

type

returns

method

string

Arguments

name

type

description

size

int

the amount of characters to grab

Explanation

Returns a substring of the given size, starting at the string's last character. Roughly equivilent to #slice(-size)

Examples

"Hello!".tail(1) == "!"
// Goat emoji is a surrogate of two bytes
"🐑🐐".tail(2) == "🐐"

Last updated

Was this helpful?