Is String's subscript O(n) when given a lot of combining code points?

It looks like Vapor’s routing is based on Character.


let pathComponents = request.url.path
            .split(separator: "/")
            .map(String.init)

i.e. it’s using Collection<Character>.split. Is this a problem?

2 Likes