cut out part of a string

Viewed 89251

Say, I have a string

"hello is it me you're looking for"

I want to cut part of this string out and return the new string, something like

s = string.cut(0,3);

s would now be equal to:

"lo is it me you're looking for"

EDIT: It may not be from 0 to 3. It could be from 5 to 7.

s = string.cut(5,7);

would return

"hellos it me you're looking for"
8 Answers
Related