     startingAt i: Int,
     in bounds: Range<Int>
   ) -> Int {
+    _internalInvariant(bounds.lowerBound >= 0 && bounds.upperBound <= count)
     _internalInvariant(bounds.contains(i))
     if _slowPath(isForeign) {
       return _foreignOpaqueCharacterStride(startingAt: i, in: bounds)

      }
    }

    return i &- previousIdx
  }


      }
    }

    _internalInvariant(nextIdx >= i && nextIdx <= bounds.upperBound)
    return nextIdx &- i
  }

