swift
e8850370 - [stdlib] String: Expose _index(roundingDown:) functions in all String views

Commit
3 years ago
[stdlib] String: Expose _index(roundingDown:) functions in all String views These simply expose the preexisting internal `_StringGuts.validate*Index` functions that indexing operations use to implicitly round indices down to the nearest valid index. (Or, in the case of the encoding views, the nearest scalar boundary.) Being able to do this as a standalone, explicit, efficient operation is crucial when implementing some `String` algorithms that need to work with arbitrary indices.
Author
Committer
Parents
Loading