Value stringValue = args[0];
Value startValue = args[1];
Value endValue = args[2];
String string = stringValue.asString();
int start = startValue.asNumber();
int end = endValue.asNumber();
int length = string.length();
if (start < 0) {
start += max(-start, length);
if (end == 0) {