Merge pull request #3268 from natecook1000/nc-scalarindex-nocore

[stdlib] Remove _StringCore from UnicodeScalarIndex
This commit is contained in:
Dmitri Gribenko
2016-07-07 17:41:36 -07:00
committed by GitHub
5 changed files with 131 additions and 152 deletions

View File

@@ -96,7 +96,10 @@ extension String {
/// Return an `Index` corresponding to the given offset in our UTF-16
/// representation.
func _index(_ utf16Index: Int) -> Index {
return Index(_base: String.UnicodeScalarView.Index(utf16Index, _core))
return Index(
_base: String.UnicodeScalarView.Index(_position: utf16Index),
in: characters
)
}
/// Return a `Range<Index>` corresponding to the given `NSRange` of