ngth;
          }
        }
      }
    }
  }

  if (isSimple) {
    if (start &gt; 0 || end &lt; uri.length) {
      uri = uri.substring(start, end);
      schemeEnd -= start;
      hostStart -= start;
      portStart -= start;
      pathStart -= start;
      queryStart -= start;
      fragmentStart -= start;
    }
    return new _SimpleUri(uri, schemeEnd, hostStart, portStart, pathStart,
        queryStart, fragmentStart, scheme);
  }

  return new _Uri.notSimple(uri, start, end, schemeEnd, hostStart, por