anchor.diff:          ++startIndex;  // empty match, advance and restart
           continue;
         }
  -      result.add(this.substring(previousIndex, match.start));
  +      result.add(this._substringUnchecked(previousIndex, match.start));
         startIndex = previousIndex = endIndex;
       }
       return result;
  
positive.code:     int previousIndex = 0;
      while (true) {
        if (startIndex == length || !iterator.hasNext) {
          result.add(this.substring(previousIndex, length));
          break;
        }
        Match match = iterator.next();
        if (match.start == length) {
          result.add(this.substring(previousIndex, length));
          break;
        }
        int endIndex = match.end;
  
negative.code:     if (startIndex > endIndex) {
        throw new RangeError.value(startIndex);
      }
      return _substringUnchecked(startIndex, endIndex);
    }
  
    String _substringUnchecked(int startIndex, int endIndex) {
      assert(endIndex != null);
      assert((startIndex >= 0) && (startIndex <= this.length));
      assert((endIndex >= 0) && (endIndex <= this.length));
      assert(startIndex <= endIndex);
  
      if (startIndex == endIndex) {
        return "";
      }
      if ((startIndex + 1) == endIndex) {
        return this[startIndex];
      }
      return _substringUncheckedNative(startIndex, endIndex);
    }
  
    String _substringUncheckedNative(int startIndex, int endIndex)
        native "StringBase_substringUnchecked";
  
    String trim() {
  