throws Throwable
  public static Value substr(Env env,                             String string,                             int start,                             @Optional Value lenV)    throws Throwable  {    int strLen = string.length();    if (start < 0)      start = strLen + start;    if (start < 0 || strLen < start)      return BooleanValue.FALSE;    if (lenV instanceof DefaultValue) {      return new StringValueImpl(string.substring(start));    }    else {      int len = lenV.toInt();      int end;      if (len < 0)        end = strLen + len;      else        end = start + len;      if (end <= start)        return StringValue.EMPTY;      else if (strLen <= end)        return new StringValueImpl(string.substring(start));      else        return new StringValueImpl(string.substring(start, end));    }  }