I’m wondering why the String.CharacterView structure has a
reserveCapacity(:) member? And even more strangely, why String itself has
the same method?

It’s even weirder that String.UnicodeScalarView has this method, but it
reserves `n` `UInt8`s of storage, instead of `n` `UInt32`s of storage. Also
why String.UTF8View and String.UTF16View do not have this method, when it
would make more sense for them to have it than for String itself and
String.CharacterView to have it.
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to