[stdlib] conversions to UTF16View.Index

Swift SVN r24013
This commit is contained in:
Dave Abrahams
2014-12-18 20:47:38 +00:00
parent 386146364b
commit 43ea3db04e
4 changed files with 48 additions and 0 deletions

View File

@@ -343,4 +343,9 @@ extension String.UnicodeScalarView.Index {
) -> String.UTF8View.Index {
return String.UTF8View.Index(self, within: otherView)
}
public func samePositionIn(
otherView: String.UTF16View
) -> String.UTF16View.Index {
return String.UTF16View.Index(self, within: otherView)
}
}