mirror of
https://github.com/apple/swift-foundation.git
synced 2025-05-24 06:20:09 +08:00
These started by converting `self` into a `String`. This lead to crashes when `self` happened to be a Substring, as the input range isn’t necessarily a valid index range in the resulting string in that case. While I’m here, review related helper functions to improve performance and to avoid more correctness issues.