mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[stdlib] Conversions to String.Index
Also, hide an initializer on String.Index that was unintentionally public/visible by giving it an underscored keyword argument. Testing comes next. Swift SVN r24069
This commit is contained in:
@@ -74,7 +74,7 @@ extension String {
|
||||
/// Return an `Index` corresponding to the given offset in our UTF-16
|
||||
/// representation.
|
||||
func _index(utf16Index: Int) -> Index {
|
||||
return Index(String.UnicodeScalarView.Index(utf16Index, _core))
|
||||
return Index(_base: String.UnicodeScalarView.Index(utf16Index, _core))
|
||||
}
|
||||
|
||||
/// Return a `Range<Index>` corresponding to the given `NSRange` of
|
||||
|
||||
Reference in New Issue
Block a user