/proc/copytext(T, Start, End)
Arguments:
T: The text string to copy from
Start = 1: The position in the string to start the copy
End = 0: The position in the string to finish the copy, exclusive
Returns:
null, text: A new string copied from the provided points

Copies characters in the provided string between the Start and End position. By default, the End value will copy the remainder of the string. You can also specify negative positions for the Start or End, which will cause it to work backwards.

world.log << copytext("Foo Bar", 5) // Bar
world.log << copytext("Foo Bar", 1, 4) // Foo

world.log << copytext("Foo Bar", -3) // Bar
world.log << copytext("Foo Bar", -7, -3) // Foo

For non-ASCII strings, where the string position does not necessarily correlate to character position, you will need the _char variant of this proc. copytext_char() works in text elements, and otherwise functions identically.