static IntegerWrapper stringMatchComputationHelper(Stella_Object pattern, Stella_Object x, Stella_Object start, Stella_Object end, boolean ignoreCaseP) {
    if (!(Stella_Object.stringP(pattern) &&
        (Stella_Object.integerP(start) &&
         Stella_Object.integerP(end)))) {
      return (null);
    }
    { String thepattern = ((StringWrapper)(pattern)).wrapperValue;
      int thestart = ((IntegerWrapper)(start)).wrapperValue;
      int theend = ((IntegerWrapper)(end)).wrapperValue;
      String name = (Stella_Object.stringP(x) ? ((StringWrapper)(x)).wrapperValue : Logic.objectNameString(x));
      int namelength = name.length();
      int matchposition = Stella.NULL_INTEGER;

      if (thestart < 0) {
        thestart = namelength + thestart + 1;
      }
      if (thestart < 0) {
        return (null);
      }
      if (theend < 0) {
        theend = namelength + theend + 1;
      }
      if ((theend < 0) ||
          (theend > namelength)) {
        return (null);
      }
      if (ignoreCaseP) {
        matchposition = Stella.stringSearchIgnoreCase(name, thepattern, thestart);
      }
      else {
        matchposition = Native.stringSearch(name, thepattern, thestart);
      }
      if ((matchposition != Stella.NULL_INTEGER) &&
          (matchposition < theend)) {
        return (IntegerWrapper.wrapInteger(matchposition));
      }
      else {
        return (null);
      }
    }
  }