Is there nice and easy way to iterate through Range<String.Index>?

I would have gone with s[r].indices rather than s.indices[r]. In String's case they're going to work, but it's not required that Self.Index and Self.Indices.Index are the same type, or that they line up, whereas Self.Index and Self.SubSequence.Index are guaranteed to be interchangeable.

2 Likes