one time index wrap-arounds for substr